summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-05-03 11:28:48 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2016-05-03 11:34:15 +0200
commit0ca5b5b23d60ed6ceda156909a685cb20d16b4e2 (patch)
tree8d274c0a0b4c7d05e7dfbbd108c6b9b7bf6ec75b /utils
parent63ece054671bdd98247e2d89e7ebd72b69078731 (diff)
Docker, change BASE_VERSION to brahmaputra.3
return ${BASE_VERSION}.0 if ${BASE_VERSION} does not exist (first time) Change-Id: I96654834099c9f806ce8aec8571a755dc803e1e9 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/calculate_version.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/calculate_version.sh b/utils/calculate_version.sh
index 4bfd13f7a..608a3bd73 100755
--- a/utils/calculate_version.sh
+++ b/utils/calculate_version.sh
@@ -36,14 +36,15 @@ function docker_version() {
tag_json=$(curl $url_tag 2>/dev/null | python -mjson.tool | grep ${BASE_VERSION} | head -1)
#e.g. tag_json= "name": "brahmaputra.0.2",
if [ "${tag_json}" == "" ]; then
- error "The Docker Image ${docker_image} does not have a TAG with base version ${BASE_VERSION}"
+ echo ${BASE_VERSION}.0
+ else
+ tag=$(echo $tag_json | awk '{print $2}' | sed 's/\,//' | sed 's/\"//g')
+ #e.g.: tag=brahmaputra.0.2
+ tag_current_version=$(echo $tag | sed 's/.*\.//')
+ tag_new_version=$(($tag_current_version+1))
+ #e.g.: tag=brahmaputra.0.3
+ echo ${BASE_VERSION}.${tag_new_version}
fi
- tag=$(echo $tag_json | awk '{print $2}' | sed 's/\,//' | sed 's/\"//g')
- #e.g.: tag=brahmaputra.0.2
- tag_current_version=$(echo $tag | sed 's/.*\.//')
- tag_new_version=$(($tag_current_version+1))
- #e.g.: tag=brahmaputra.0.3
- echo ${BASE_VERSION}.${tag_new_version}
}