-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make previous version optional in release_pull_request.bash #1013
base: master
Are you sure you want to change the base?
Conversation
This also adds some documentation Signed-off-by: Addisu Z. Taddese <[email protected]>
exit 1 | ||
fi | ||
|
||
set -e | ||
|
||
git fetch --tags | ||
PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm tempted to try to use the TO_BRANCH
variable here to try to make sure we identify a tag that matches the major version of our target branch, though it may not be necessary. Feel free to ignore this suggestion.
PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') | |
PREV_VER=$(git describe --tags --match ${TO_BRANCH}* --abbrev=0 | sed 's/.*_//') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Co-authored-by: Steve Peters <[email protected]>
# | ||
# Requires the 'gh' CLI to be installed. | ||
# | ||
# Usage: | ||
# $ ./merge_forward_pull_request.bash <from_branch> <to_branch> | ||
# $ ./release_pull_request.bash <from_branch> <to_branch> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# $ ./release_pull_request.bash <from_branch> <to_branch> | |
# $ ./release_pull_request.bash <new_version> <to_branch> |
Not fully convinced that the name to_branch
is the best one to use here. Maybe base_branch
? Feel free to ignore.
# | ||
# For example, to merge `ign-rendering6` forward to `main`: | ||
# For example, to release `gz-rendering7` 7.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# For example, to release `gz-rendering7` 7.1.0 | |
# For example, to release 7.1.0 using the `gz-rendering7` branch |
I'm trying to match order and concepts defined in the help usage.
exit 1 | ||
fi | ||
|
||
set -e | ||
|
||
git fetch --tags | ||
PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -44,7 +49,10 @@ CURRENT_BRANCH="${REMOTE}:${LOCAL_BRANCH}" | |||
ORIGIN_URL=$(git remote get-url origin) | |||
ORIGIN_ORG_REPO=$(echo ${ORIGIN_URL} | sed -e 's@.*github\.com.@@' | sed -e 's/\.git//g') | |||
|
|||
PREV_TAG=$(git tag | grep "_${PREV_VER}$") | |||
if [[ $PREV_VER == $VERSION ]] then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ $PREV_VER == $VERSION ]] then | |
if [[ "$PREV_VER" == "$VERSION" ]]; then |
Beware, this has a broken syntax
This also adds some documentation