Add shell script linting with shellcheck for better portability

This commit is contained in:
Damien Duportal 2019-05-10 17:24:06 +02:00 committed by Traefiker Bot
parent ab60e702d2
commit 886a6bdbe0
15 changed files with 87 additions and 57 deletions

View file

@ -8,9 +8,9 @@ fi
rm -f dist/traefik
FLAGS=""
FLAGS=()
if [ -n "$VERBOSE" ]; then
FLAGS="${FLAGS} -v"
FLAGS+=(-v)
fi
if [ -z "$VERSION" ]; then
@ -26,7 +26,7 @@ if [ -z "$DATE" ]; then
fi
# Build binaries
CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w \
CGO_ENABLED=0 GOGC=off go build "${FLAGS[@]}" -ldflags "-s -w \
-X github.com/containous/traefik/pkg/version.Version=$VERSION \
-X github.com/containous/traefik/pkg/version.Codename=$CODENAME \
-X github.com/containous/traefik/pkg/version.BuildDate=$DATE" \