diff --git a/.travis.yml b/.travis.yml index d6609105..75e3cab6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ script: - ./test-functional - DEX_TEST_DSN="sqlite3://:memory:" ./test-functional - ./build-docker + - ./build-docker clean deploy: provider: script diff --git a/build-docker b/build-docker index 4b07254c..299c7ef9 100755 --- a/build-docker +++ b/build-docker @@ -35,7 +35,17 @@ push() { docker push $repo:latest } -build -if [[ "push" == "$1" ]]; then - push +clean() { + docker rmi $repo:$version + docker rmi $repo:latest +} + +if [[ "clean" == "$1" ]]; then + clean +else + build + if [[ "push" == "$1" ]]; then + push + fi fi +