Created
June 27, 2018 13:48
-
-
Save gustavomcarmo/332e40f4e81103b0d0dd5ad077f0e446 to your computer and use it in GitHub Desktop.
Script to set the TAG value for posterior using in Bamboo job. Assumes the TAG is not latest if follows the semantic versioning, starting with v.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rx='^v([0-9]+\.){0,2}(\*|[0-9]+)$' | |
if [[ ${bamboo.planRepository.1.revision} =~ $rx ]]; then | |
TAG=${bamboo.planRepository.1.revision} | |
else | |
TAG=latest | |
fi | |
echo TAG=$TAG > properties.txt | |
cat properties.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment