Skip to content

Commit 303f17b

Browse files
committed
Remove usage .version and replace it with $dir variable.
The variable has format like: 1.24, 2.4-micro, 13. So it can be used for tagging and testing. As well as for test.sh it can be used Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent 70b5195 commit 303f17b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tag.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ for dir in ${VERSIONS}; do
3232
pushd "${dir}" > /dev/null
3333
IMAGE_ID=$(cat .image-id)
3434
name=$(docker inspect -f "{{.Config.Labels.name}}" "$IMAGE_ID")
35-
version=$(docker inspect -f "{{.Config.Labels.version}}" "$IMAGE_ID")
3635
# We need to check '.git' dir in root directory
3736
if [ -d "../.git" ] ; then
3837
commit_date=$(git show -s HEAD --format=%cd --date=short | sed 's/-//g')
@@ -42,10 +41,10 @@ for dir in ${VERSIONS}; do
4241
fi
4342

4443
full_reg_name="$REGISTRY$name"
45-
echo "-> Tagging image '$IMAGE_ID' as '$full_reg_name:$version' and '$full_reg_name:latest' and '$full_reg_name:$OS' and '$full_reg_name:$date_and_hash'"
44+
echo "-> Tagging image '$IMAGE_ID' as '$full_reg_name:$dir' and '$full_reg_name:latest' and '$full_reg_name:$OS' and '$full_reg_name:$date_and_hash'"
4645

4746
docker tag "$IMAGE_ID" "$full_reg_name:$OS"
48-
docker tag "$IMAGE_ID" "$full_reg_name:$version"
47+
docker tag "$IMAGE_ID" "$full_reg_name:$dir"
4948
docker tag "$IMAGE_ID" "$full_reg_name:latest"
5049
docker tag "$IMAGE_ID" "$full_reg_name:$date_and_hash"
5150

test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ for dir in ${VERSIONS}; do
7373
pushd "${dir}" > /dev/null || exit 1
7474
IMAGE_ID=$(cat .image-id)
7575
export IMAGE_ID
76-
IMAGE_VERSION=$(docker inspect -f "{{.Config.Labels.version}}" "$IMAGE_ID")
7776
# Kept also IMAGE_NAME as some tests might still use that.
78-
IMAGE_NAME="$(docker inspect -f "{{.Config.Labels.name}}" "$IMAGE_ID"):$IMAGE_VERSION"
77+
IMAGE_NAME="$(docker inspect -f "{{.Config.Labels.name}}" "$IMAGE_ID"):$dir"
7978
# shellcheck disable=SC2268
8079
if [ "${OS}" == "c9s" ] || [ "${OS}" == "c10s" ] || [ "${OS}" == "fedora" ]; then
8180
export IMAGE_NAME="$REGISTRY$IMAGE_NAME"

0 commit comments

Comments
 (0)