TRAVIS_TAG
envvar needs to be visible to the shell running the build logic – i.e. the main shell process. You are running ./script.sh
as a child process so its environment changes don’t propagate to the main shell.
source ./script.sh
should fix the problem.