Skip to content

Commit

Permalink
Update version in corral.json on release
Browse files Browse the repository at this point in the history
There's an info.version field in corral.json that should be updated
on release. This change picks up doing that.

Closes #27
  • Loading branch information
SeanTAllen committed Feb 7, 2021
1 parent 74ddc5d commit b200e1f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/start-a-release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# - Getting latest changes on the default branch
# - Updating version in
# - VERSION
# - corral.json
# - CHANGELOG.md
# - Pushing updated VERSION and CHANGELOG.md back to the default branch
# - Pushing tag to kick off building artifacts
Expand All @@ -16,6 +17,7 @@
# - bash
# - changelog-tool
# - git
# - jq

set -o errexit

Expand Down Expand Up @@ -73,13 +75,24 @@ git pull
echo -e "\e[34mUpdating VERSION to ${VERSION}\e[0m"
echo "${VERSION}" > VERSION

# update version in corral.json if it exists
if test -f "corral.json"; then
echo -e "\e[34mUpdating VERSION in corral.json to ${VERSION}\e[0m"
jq ".info.version = \"${VERSION}\"" corral.json > corral.tmp
mv corral.tmp corral.json
fi

# version the changelog
echo -e "\e[34mUpdating CHANGELOG.md for release\e[0m"
changelog-tool release "${VERSION}" -e

# commit CHANGELOG and VERSION updates
# commit "version" updates
echo -e "\e[34mCommiting VERSION and CHANGELOG.md changes\e[0m"
git add CHANGELOG.md VERSION
if test -f "corral.json"; then
echo -e "\e[34mCommiting corral.json changes\e[0m"
git add corral.json
fi
git commit -m "${VERSION} release"

# tag release
Expand Down

0 comments on commit b200e1f

Please sign in to comment.