Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pact-cli version on image release #120

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:
inputs:
increment:
description: Increment
default: minor
default: "null"
type: choice
options:
- "null"
- major
- minor
- patch
Expand Down
8 changes: 8 additions & 0 deletions script/release-workflow/git-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -euo >/dev/null

if [[ $(git status --porcelain) ]]; then
git add Gemfile.lock VERSION lib/pact/cli/version.rb
git commit -m "chore(release): version ${TAG}"
fi
12 changes: 9 additions & 3 deletions script/release-workflow/next-docker-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

set -eu

gem_version_from_gemfile_lock() {
grep "pact_broker (" pact_broker/Gemfile.lock | awk -F '[()]' '{print $2}'
}
# If increment in null, then use the existing version number
# and just increase `n` by 1 in semver version x.y.z.n
# as set in .github./workflows/release_image.yml
# as set in script/release.sh
if [ "${INCREMENT:-}" ]; then
if [ "${INCREMENT:-}" != "null" ]; then
bundle exec bump ${INCREMENT:-minor} --no-commit --replace-in $PWD/lib/pact/cli/version.rb > /dev/null
fi
fi

gem_version=$(ruby -I lib -e "require 'pact/cli/version.rb'; puts Pact::Cli::VERSION")
existing_tags=$(git tag)
Expand Down
1 change: 1 addition & 0 deletions script/release-workflow/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ ${script_dir}/docker-build.sh
${script_dir}/scan.sh
${script_dir}/prepare-release.sh
${script_dir}/docker-push.sh
${script_dir}/git-commit.sh
${script_dir}/git-push.sh