yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [yetus] branch master updated: YETUS-817. upgrade to shellcheck 0.6.0
Date Mon, 11 Mar 2019 15:35:45 GMT
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new e28ec29  YETUS-817. upgrade to shellcheck 0.6.0
e28ec29 is described below

commit e28ec292f195c404be7d453f2e9b1817a0d7e7a5
Author: Allen Wittenauer <aw@apache.org>
AuthorDate: Sun Mar 10 11:34:36 2019 -0700

    YETUS-817. upgrade to shellcheck 0.6.0
    
    Signed-off-by: Sean Busbey <busbey@apache.org>
---
 precommit/src/main/shell/test-patch-docker/Dockerfile | 6 ++++--
 precommit/src/main/shell/test-patch.d/maven.sh        | 2 +-
 precommit/src/test/shell/run-bats.sh                  | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile
index acac18b..138aa03 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -199,10 +199,12 @@ ENV BUNDLE_PATH /var/tmp/.bundler-gems
 ####
 # Install shellcheck (shell script lint)
 ####
-RUN add-apt-repository -y ppa:jonathonf/ghc-8.0.2
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y shellcheck
\
+RUN apt-get -q update && apt-get -q install --no-install-recommends -y cabal-install
\
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*
+RUN cabal update
+RUN cabal install ShellCheck \
+    && cp -p /root/.cabal/bin/shellcheck /usr/local/bin/shellcheck
 
 ###
 # Install hadolint
diff --git a/precommit/src/main/shell/test-patch.d/maven.sh b/precommit/src/main/shell/test-patch.d/maven.sh
index 09c7064..64fbcc2 100755
--- a/precommit/src/main/shell/test-patch.d/maven.sh
+++ b/precommit/src/main/shell/test-patch.d/maven.sh
@@ -538,7 +538,7 @@ function maven_unit_test_filter()
 {
   declare filtered
 
-  if [[ ! -z "${UNIT_TEST_FILTER_FILE}" ]]; then
+  if [[ -n "${UNIT_TEST_FILTER_FILE}" ]]; then
     while read -r line || [[ -n "${line}" ]]; do
       if [[ -z $line ]]; then
         continue
diff --git a/precommit/src/test/shell/run-bats.sh b/precommit/src/test/shell/run-bats.sh
index 566f47a..24ea79e 100755
--- a/precommit/src/test/shell/run-bats.sh
+++ b/precommit/src/test/shell/run-bats.sh
@@ -17,7 +17,7 @@
 targetdir=../../../target
 mkdir -p ${targetdir}/surefire-reports ${targetdir}/tap
 
-batsexe=$(which bats) 2>/dev/null
+batsexe=$(command -v bats) 2>/dev/null
 
 if [[ -z ${batsexe} ]]; then
   echo "not ok - no bats executable found" >  "${targetdir}/tap/shelltest.tap"


Mime
View raw message