CI: Move CI code into a single script
This commit is contained in:
parent
df5ce73e76
commit
93289c7c09
|
@ -5,10 +5,4 @@ cache:
|
||||||
directories:
|
directories:
|
||||||
- "/opt/shellcheck"
|
- "/opt/shellcheck"
|
||||||
script:
|
script:
|
||||||
- mkdir -p /opt/shellcheck
|
- ci/run_shellcheck
|
||||||
- "[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz
|
|
||||||
| tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck
|
|
||||||
> /dev/null || true"
|
|
||||||
- sudo chmod +x /opt/shellcheck/shellcheck
|
|
||||||
- "/opt/shellcheck/shellcheck --version"
|
|
||||||
- "/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)"
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o errtrace
|
||||||
|
shopt -s inherit_errexit
|
||||||
|
|
||||||
|
ci/run_shellcheck mkdir -p /opt/shellcheck
|
||||||
|
[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz
|
||||||
|
| tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck
|
||||||
|
> /dev/null || true
|
||||||
|
sudo chmod +x /opt/shellcheck/shellcheck
|
||||||
|
/opt/shellcheck/shellcheck --version
|
||||||
|
/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .)
|
Loading…
Reference in New Issue