Skip to content

Commit

Permalink
chore: add manual docker push script
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Nov 7, 2017
1 parent 80502f3 commit 21d957d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 12 additions & 0 deletions script/manual_push.sh
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion script/next-docker-tag.sh
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
2 changes: 0 additions & 2 deletions script/release.sh
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down

0 comments on commit 21d957d

Please sign in to comment.