Skip to content

Commit

Permalink
Write release version to src/VERSION in update-changelog and `rel…
Browse files Browse the repository at this point in the history
…ease-update` (#14547)
  • Loading branch information
straight-shoota authored May 8, 2024
1 parent a23f0fb commit a3bbcf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/release-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ set -eu

CRYSTAL_VERSION=$1

# Write dev version for next minor release into src/VERSION
minor_branch="${CRYSTAL_VERSION%.*}"
next_minor="$((${minor_branch#*.} + 1))"
echo "${CRYSTAL_VERSION%%.*}.${next_minor}.0-dev" > src/VERSION

# Edit PREVIOUS_CRYSTAL_BASE_URL in .circleci/config.yml
sed -i -E "s|[0-9.]+/crystal-[0-9.]+-[0-9]|$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1|g" .circleci/config.yml

Expand Down
4 changes: 4 additions & 0 deletions scripts/update-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ scripts/github-changelog.cr $VERSION > $current_changelog
echo "Switching to branch $branch"
git switch $branch 2>/dev/null || git switch -c $branch;

# Write release version into src/VERSION
echo "${VERSION}" > src/VERSION
git add src/VERSION

if grep --silent -E "^## \[$VERSION\]" CHANGELOG.md; then
echo "Replacing section in CHANGELOG"

Expand Down

0 comments on commit a3bbcf9

Please sign in to comment.