mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-11 16:32:59 +00:00
add linting for shell scripts and Dockerfiles
* add hadolint for dockerfile linting * add hadofile config * add checks for dockerfiles and shellcheck into makefile * shellcheck fixes * add workaround so that .env can be sourced again from version.sh * hadolint fixes * print progress of build/run.sh * fix check for jq in setup.sh relates to #41 and #26
This commit is contained in:
@@ -197,6 +197,14 @@ publish-webapp: build-webapp tag-webapp
|
||||
publish-zpush: build-zpush tag-zpush
|
||||
component=zpush make publish-container
|
||||
|
||||
check-scripts:
|
||||
grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \
|
||||
--exclude-dir=.git --exclude=*.sw? \
|
||||
| xargs shellcheck
|
||||
# List files which name starts with 'Dockerfile'
|
||||
# eg. Dockerfile, Dockerfile.build, etc.
|
||||
git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 hadolint
|
||||
|
||||
test:
|
||||
docker-compose -f $(COMPOSE_FILE) down -v || true
|
||||
make build-all
|
||||
|
||||
Reference in New Issue
Block a user