diff --git a/script/manual_push.sh b/script/manual_push.sh new file mode 100755 index 0000000..76b394e --- /dev/null +++ b/script/manual_push.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Ripped from https://gist.github.com/didip/ff5088fd023624aba7c0 + +set -ex + +IMAGE_NAME="dius/pact-broker" +TAG=$(script/next-docker-tag.sh) + +docker pull ${IMAGE_NAME} +docker build -t ${IMAGE_NAME}:${TAG} . +# docker tag ${IMAGE_NAME}:${TAG} ${IMAGE_NAME}:latest +docker push ${IMAGE_NAME}:${TAG} diff --git a/script/next-docker-tag.sh b/script/next-docker-tag.sh index f97fa45..8a90d99 100755 --- a/script/next-docker-tag.sh +++ b/script/next-docker-tag.sh @@ -1,4 +1,4 @@ -DOCKER_IMAGE=dius/pact-broker +DOCKER_IMAGE="dius/pact-broker" 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') diff --git a/script/release.sh b/script/release.sh index f40f131..e131a9c 100755 --- a/script/release.sh +++ b/script/release.sh @@ -1,7 +1,5 @@ set -e -DOCKER_IMAGE="dius/pact-broker" - export TAG=$(script/next-docker-tag.sh) bundle exec rake generate_changelog git add CHANGELOG.md && git commit -m "chore(changelog): update for ${TAG}"