mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
[Tests] Create shellcheck.sh to handle shellcheck tests
This would make the shellcheck related process much more maintainable and make .travis.yml simpler.
This commit is contained in:
parent
60ba4bca0c
commit
55ae1271b7
@ -25,8 +25,7 @@ install:
|
|||||||
- chmod +x /tmp/urchin/package/urchin
|
- chmod +x /tmp/urchin/package/urchin
|
||||||
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
|
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
|
||||||
script:
|
script:
|
||||||
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh && shellcheck -s bash install.sh ; fi
|
- if [ -n "${SHELLCHECK-}" ]; then ./shellcheck.sh ; else make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
|
||||||
- if [ -z "${SHELLCHECK-}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- CXX=g++-4.8
|
- CXX=g++-4.8
|
||||||
|
11
shellcheck.sh
Executable file
11
shellcheck.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
for shell in bash sh dash ksh
|
||||||
|
do
|
||||||
|
shellcheck -s "${shell}" nvm.sh
|
||||||
|
done
|
||||||
|
|
||||||
|
for bash_script in install.sh
|
||||||
|
do
|
||||||
|
shellcheck -s bash "${bash_script}"
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user