This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new d7f8787  fix #602: Script set-version.sh does not honor the 
registry/repository settings.
d7f8787 is described below

commit d7f87872a4e5f50618fec6add9d746d98208c711
Author: Andrea Tarocchi <ataro...@redhat.com>
AuthorDate: Wed Apr 10 23:54:20 2019 +0200

    fix #602: Script set-version.sh does not honor the registry/repository 
settings.
---
 script/Makefile       | 2 +-
 script/set_version.sh | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/script/Makefile b/script/Makefile
index a82a35e..afaeb5a 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -108,7 +108,7 @@ images-push:
        docker push $(IMAGE_NAME):$(VERSION)
 
 set-version:
-       ./script/set_version.sh $(VERSION)
+       ./script/set_version.sh $(VERSION) $(IMAGE_NAME)
 
 git-tag:
        ./script/git_tag.sh $(VERSION) $(RELEASE_GIT_REMOTE)
diff --git a/script/set_version.sh b/script/set_version.sh
index c96d76c..33d3aff 100755
--- a/script/set_version.sh
+++ b/script/set_version.sh
@@ -9,10 +9,13 @@ fi
 
 location=$(dirname $0)
 version=$1
+image_name=${2:-docker.io\/apache\/camel-k}
+sanitized_image_name=${image_name/\//\\\/}
+
 
 for f in $(find $location/../deploy -type f -name "*.yaml"); 
 do
-    sed -i -r 
"s/docker.io\/apache\/camel-k:([0-9]+[a-zA-Z0-9\-\.].*).*/docker.io\/apache\/camel-k:${version}/"
 $f
+    sed -i -r 
"s/docker.io\/apache\/camel-k:([0-9]+[a-zA-Z0-9\-\.].*).*/${sanitized_image_name}:${version}/"
 $f
 done
 
-echo "Camel K version set to: $version"
+echo "Camel K version set to: $version and image name to: $image_name"

Reply via email to