CI: Remove shebang from non-executable scripts

Some of our CI shell scripts are meant only to be sourced and not
run directly however they include an initial shebang line, implying that
they should be run.

Remove the shebang line from `crates.sh` and the various `test_vars.sh`
scripts. Add a `shellcheck` directive to inhibit the no-shebang warning.

Fix: #2764
This commit is contained in:
Tobin C. Harding 2024-05-31 10:10:00 +10:00
parent 3c87d0c5a3
commit 60ab3d26e5
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
8 changed files with 24 additions and 8 deletions

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

4
contrib/crates.sh Executable file → Normal file
View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# #
# Used by labeler.yaml # Used by labeler.yaml
# #

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,4 +1,6 @@
#!/usr/bin/env bash # No shebang, this file should not be executed.
# shellcheck disable=SC2148
#
# disable verify unused vars, despite the fact that they are used when sourced # disable verify unused vars, despite the fact that they are used when sourced
# shellcheck disable=SC2034 # shellcheck disable=SC2034