Skip to content

Commit

Permalink
Set versions differently for Changelog PR
Browse files Browse the repository at this point in the history
on `main` , as compared to the Release PR on the version-branch , e.g. `2.18.x`.
  • Loading branch information
pallavisontakke committed Dec 16, 2024
1 parent 3f78f4b commit 54026dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/release/create_minor_release_PR_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ NEW_PATCH_VERSION="0"
NEW_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
RELEASE_BRANCH="${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}"
CURRENT_VERSION=$(tail -1 version.config | cut -d ' ' -f 3)
CURRENT_MINOR_VERSION=$(echo $NEW_VERSION | cut -d '.' -f 2)
NEW_MINOR_VERSION=$((CURRENT_MINOR_VERSION + 1))
cd sql/updates

for f in ./*
Expand Down Expand Up @@ -137,6 +139,15 @@ done

cd ..


if [[ $RELEASE_BRANCH_EXISTS == '0' ]]; then
echo "---- Modifying version.config to the new versions , if current PR is for main----"
sed -i.bak "s/${NEW_VERSION}/${NEW_VERSION}-dev/g" version.config
sed -i.bak "s/${CURRENT_MINOR_VERSION}/${NEW_MINOR_VERSION}/g" version.config
sed -i.bak "s/${CURRENT_VERSION}/${NEW_VERSION}/g" version.config
rm version.config.bak
fi

git diff HEAD --name-only


Expand Down

0 comments on commit 54026dc

Please sign in to comment.