Skip to content

Commit

Permalink
fix #602: Script set-version.sh does not honor the registry/repositor…
Browse files Browse the repository at this point in the history
…y settings.
  • Loading branch information
valdar committed Apr 10, 2019
1 parent a0d035b commit f7aac4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,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)
Expand Down
7 changes: 5 additions & 2 deletions script/set_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit f7aac4d

Please sign in to comment.