diff --git a/ci/manifest.sh b/ci/manifest.sh index 1a126afb..bb3e3c98 100755 --- a/ci/manifest.sh +++ b/ci/manifest.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 OR MIT set -euxo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. diff --git a/main.sh b/main.sh index 2bec4df8..6fdfa86a 100755 --- a/main.sh +++ b/main.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 OR MIT set -euo pipefail IFS=$'\n\t' diff --git a/tools/.tidy-check-license-headers b/tools/.tidy-check-license-headers new file mode 100644 index 00000000..3c5d9a0c --- /dev/null +++ b/tools/.tidy-check-license-headers @@ -0,0 +1 @@ +git ls-files '*.sh' # TODO: check more files diff --git a/tools/manifest.sh b/tools/manifest.sh index ad40ddda..9fd588f4 100755 --- a/tools/manifest.sh +++ b/tools/manifest.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 OR MIT set -euo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. diff --git a/tools/publish.sh b/tools/publish.sh index 502c3d9f..af738151 100755 --- a/tools/publish.sh +++ b/tools/publish.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 OR MIT set -euo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. diff --git a/tools/tidy.sh b/tools/tidy.sh index 1f2fda37..d48866ca 100755 --- a/tools/tidy.sh +++ b/tools/tidy.sh @@ -201,6 +201,44 @@ else warn "'shellcheck' is not installed" fi +# License check +# TODO: This check is still experimental and does not track all files that should be tracked. +if [[ -f tools/.tidy-check-license-headers ]]; then + info "checking license headers (experimental)" + failed_files='' + for p in $(eval $(