Skip to content

Commit

Permalink
Fix realese.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
myakove committed Sep 1, 2021
1 parent 44e1091 commit 19a9c2e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@ if ! git pull origin "$BASE_SOURCE_BRANCH"; then
exit 1
fi

# Create branch for the new release
if ! git checkout -b "$TARGET_BRANCH" origin/"$BASE_SOURCE_BRANCH"; then
echo "Failed to create new branch $TARGET_BRANCH"
exit 1
fi


OLD_VERSION=$(grep version setup.cfg | awk -F' = ' '{print $2}')

# Update setup.cfg with the new version and push to $TARGET_BRANCH
sed -i s/"$OLD_VERSION"/"$STRIPPED_VERSION"/g "$SETUP_CFG"
git commit -am "Update version: $TARGET_BRANCH"
git merge origin/"$BASE_SOURCE_BRANCH"
git push origin "$TARGET_BRANCH"
git push origin -f "$BASE_SOURCE_BRANCH"

# Create branch for the new release
if ! git checkout -b "$TARGET_BRANCH" origin/"$BASE_SOURCE_BRANCH"; then
echo "Failed to create new branch $TARGET_BRANCH"
exit 1
fi

# Create release on Github
gh release create "$VERSION"
Expand Down

0 comments on commit 19a9c2e

Please sign in to comment.