Skip to content

Commit

Permalink
chore: improve logic for getting pact_broker gem version
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 30, 2017
1 parent 3348c0f commit 1dd63f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/next-docker-tag.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DOCKER_IMAGE=dius/pact-broker
gem_version=$(cat pact_broker/Gemfile.lock | grep "pact_broker" | head -1 | egrep -o "[0-9][0-9\.]+[0-9]")
gem_version=$(BUNDLE_GEMFILE=pact_broker/Gemfile bundle exec ruby -e "require 'pact_broker/version'; puts PactBroker::VERSION")
existing_tags=$(wget -q https://registry.hub.docker.com/v1/repositories/${DOCKER_IMAGE}/tags -O - | jq -r .[].name)
existing_release_numbers_for_current_gem_version=$(echo "$existing_tags" | grep "${gem_version}-" | sed 's/'${gem_version}'-//g')
last_release_number=$(printf "0\n${existing_release_numbers_for_current_gem_version}" | sort -g | tail -1)
Expand Down

0 comments on commit 1dd63f5

Please sign in to comment.