Skip to content

Commit

Permalink
Lint utility: even more thorough tidying (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
plumdog authored Apr 22, 2021
1 parent fe4289d commit 8a2f3cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tools/lint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash -ex

docker run --rm -it -v $(pwd):/repo --workdir /repo quay.io/helmpack/chart-testing ct lint --config ct.yaml "$@"
# Tidy up any generated sub-charts directories, which will be owned by root because of the docker container
docker run --rm -it -v $(pwd):/repo --workdir /repo quay.io/helmpack/chart-testing sh -c 'rm -rf charts/**/charts'
cleanup() {
# Tidy up any generated sub-charts directories, which will be owned by root because of the docker container
echo "CLEANING UP"
docker run --rm -it -v $(pwd):/repo --workdir /repo quay.io/helmpack/chart-testing sh -c 'rm -rf charts/**/charts && rm -rf charts/**/tmpcharts'
}

main() {
trap cleanup EXIT
cleanup
docker run --rm -it -v $(pwd):/repo --workdir /repo quay.io/helmpack/chart-testing ct lint --config ct.yaml "$@"
}

main "$@"

0 comments on commit 8a2f3cb

Please sign in to comment.