travis: run the cross compile only when deploying

Michael Muré created

note: travis is dumb here and we have to rewrite the same condition twice.
simply deploy/script would run all the time

Change summary

.travis.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Detailed changes

.travis.yml 🔗

@@ -14,7 +14,10 @@ script:
   - make test
 
 after_success:
-  - gox -tags=deploy_build -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
+  - if [ ! -z "$TRAVIS_TAG" ]; then
+      gox -tags=deploy_build -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
+    fi
+
 
 deploy:
   provider: releases