Skip to content

Commit

Permalink
Fix branch names for release workflows (#155)
Browse files Browse the repository at this point in the history
*Issue #, if available:*


*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
srprash authored Apr 12, 2024
1 parent 2977627 commit ea32126
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/post_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Determine release branch and checkout
run: |
RELEASE_BRANCH="release/${MAJOR_MINOR}.x"
RELEASE_BRANCH="release/v${MAJOR_MINOR}.x"
git fetch origin $RELEASE_BRANCH
git checkout -b "prepare-main-for-next-dev-cycle-${VERSION}" origin/$RELEASE_BRANCH
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/pre_release_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,36 @@ jobs:
fi
if git ls-remote --heads origin release/${MAJOR_MINOR}.x | grep -q "release/${MAJOR_MINOR}.x"; then
if git ls-remote --heads origin release/v${MAJOR_MINOR}.x | grep -q "release/v${MAJOR_MINOR}.x"; then
if [ "$IS_PATCH" = "true" ]; then
git fetch origin release/${MAJOR_MINOR}.x
echo "Branch release/${MAJOR_MINOR}.x already exists, checking out."
git checkout "release/${MAJOR_MINOR}.x"
git fetch origin release/v${MAJOR_MINOR}.x
echo "Branch release/v${MAJOR_MINOR}.x already exists, checking out."
git checkout "release/v${MAJOR_MINOR}.x"
else
echo "Error, release series branch release/${MAJOR_MINOR}.x exist for non-patch release"
echo "Error, release series branch release/v${MAJOR_MINOR}.x exist for non-patch release"
echo "Check your input or branch"
exit 1
fi
else
if [ "$IS_PATCH" = "true" ]; then
echo "Error, release series branch release/${MAJOR_MINOR}.x NOT exist for patch release"
echo "Error, release series branch release/v${MAJOR_MINOR}.x NOT exist for patch release"
echo "Check your input or branch"
exit 1
else
echo "Creating branch release/${MAJOR_MINOR}.x."
git checkout -b "release/${MAJOR_MINOR}.x"
git push origin "release/${MAJOR_MINOR}.x"
echo "Creating branch release/v${MAJOR_MINOR}.x."
git checkout -b "release/v${MAJOR_MINOR}.x"
git push origin "release/v${MAJOR_MINOR}.x"
fi
fi
git checkout -b "${VERSION}_release"
git push origin "${VERSION}_release"
git checkout -b "v${VERSION}_release"
git push origin "v${VERSION}_release"
- name: Update version in file
run: |
sed -i "s/__version__ = \".*\"/__version__ = \\\"${VERSION}\\\"/" aws-opentelemetry-distro/src/amazon/opentelemetry/distro/version.py
git commit -am "Update version to ${VERSION}"
git push origin "${VERSION}_release"
git push origin "v${VERSION}_release"
- name: Create pull request against the release branch
env:
Expand All @@ -83,5 +83,5 @@ jobs:
--body "This PR updates the version to ${VERSION}.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
--head ${{ github.event.inputs.version }}_release \
--base release/${MAJOR_MINOR}.x
--head v${{ github.event.inputs.version }}_release \
--base release/v${MAJOR_MINOR}.x

0 comments on commit ea32126

Please sign in to comment.