fixed shellcheck version

This commit is contained in:
Georg Lauterbach 2020-09-08 19:49:19 +02:00
parent f7ca406ec9
commit 323303431a
No known key found for this signature in database
GPG key ID: 386D76E7AD496709
5 changed files with 11 additions and 8 deletions

View file

@ -9,7 +9,7 @@ sudo: required
env: env:
global: global:
- HADOLINT_VERSION=1.17.1 - HADOLINT_VERSION=1.17.1
- SHELLCHECK_VERSION=latest - SHELLCHECK_VERSION=0.7.1
addons: addons:
apt: apt:
@ -22,7 +22,7 @@ services:
before_install: before_install:
- sudo curl -L https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m) -o /usr/local/bin/hadolint - sudo curl -L https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m) -o /usr/local/bin/hadolint
- sudo chmod +rx /usr/local/bin/hadolint - sudo chmod +rx /usr/local/bin/hadolint
- sudo wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv - sudo wget -qO- "https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv
- sudo cp "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ - sudo cp "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/
install: install:

View file

@ -168,9 +168,10 @@ shellcheck:
@ shellcheck --version @ shellcheck --version
@ echo '' @ echo ''
# currently without `start-mailserver` as this is to be merged separately # currently without `start-mailserver` as this is to be merged separately
@ if find -iname "*.sh" -not -path "./test/*" -not -path "./target/docker-configomat/*" -not -wholename ./target/start-mailserver.sh -exec shellcheck -S style -Cauto -e SC2250,SC2154 -W 50 {} \; | grep .; then\ @ if find -iname "*.sh" -not -path "./test/*" -not -path "./target/docker-configomat/*" -not -wholename ./target/start-mailserver.sh -exec shellcheck -S style -Cauto -o all -e SC2250,SC2154 -W 50 {} \; | grep .; then\
echo -e "\nError" ;\ echo -e "\nError" ;\
exit 1 ;\ exit 1 ;\
else\ else\
echo -e '\nSuccess' ;\ echo -e '\nSuccess' ;\
fi fi

View file

@ -30,7 +30,9 @@ function _get_current_directory()
fi fi
} }
CDIR="$(pwd)" ; _get_current_directory CDIR="$(pwd)"
_get_current_directory
CRI= CRI=
INFO= INFO=
IMAGE_NAME= IMAGE_NAME=

View file

@ -149,11 +149,11 @@ do
# test if user has a defined quota # test if user has a defined quota
if [[ -f /tmp/docker-mailserver/dovecot-quotas.cf ]] if [[ -f /tmp/docker-mailserver/dovecot-quotas.cf ]]
then then
IFS=':' declare -a USER_QUOTA
read -r -a user_quota < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf) IFS=':' ; read -r -a USER_QUOTA < <(grep "${user}@${domain}:" -i /tmp/docker-mailserver/dovecot-quotas.cf)
unset IFS unset IFS
[[ ${#user_quota[@]} -eq 2 ]] && user_attributes="${user_attributes}userdb_quota_rule=*:bytes=${user_quota[1]}" [[ ${#USER_QUOTA[@]} -eq 2 ]] && user_attributes="${user_attributes}userdb_quota_rule=*:bytes=${USER_QUOTA[1]}"
fi fi
echo "${login} ${domain}/${user}/" >>/etc/postfix/vmailbox echo "${login} ${domain}/${user}/" >>/etc/postfix/vmailbox

View file

@ -145,7 +145,7 @@ function _notify()
* ) options="-e" ;; * ) options="-e" ;;
esac esac
[[ -n "${msg}" ]] && echo ${options} "${msg}" [[ -n "${msg}" ]] && echo "${options}" "${msg}"
} }
export -f _notify export -f _notify