Skip to content

Commit

Permalink
Disable some shellchecks. (#542)
Browse files Browse the repository at this point in the history
* Disable some shellchecks.

* Disable some shellchecks.
  • Loading branch information
jerjou authored and lesv committed Mar 6, 2017
1 parent 1971e91 commit 2205147
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ shopt -s globstar

app_version=""

# shellcheck disable=SC2120
delete_app_version() {
if [ -n "${app_version}" ] || [ $# -gt 0 ]; then
yes | gcloud --project="${GOOGLE_PROJECT_ID}" \
Expand All @@ -29,7 +30,7 @@ handle_error() {
errcode=$? # Remember the error code so we can exit with it after cleanup

# Clean up
delete_app_version
delete_app_version # shellcheck disable=SC2119

exit ${errcode}
}
Expand All @@ -39,7 +40,7 @@ trap handle_error ERR
shellcheck ./**/*.sh

# Find all jenkins.sh's and run them.
find . -mindepth 2 -maxdepth 5 -name jenkins.sh -type f | while read path; do
find . -mindepth 2 -maxdepth 5 -name jenkins.sh -type f | while read -r path; do
dir="${path%/jenkins.sh}"
app_version="jenkins-${dir//[^a-z]/}"
(
Expand Down

0 comments on commit 2205147

Please sign in to comment.