Make previous version optional in release_pull_request.bash#1013
Open
azeey wants to merge 3 commits intogazebo-tooling:masterfrom
Open
Make previous version optional in release_pull_request.bash#1013azeey wants to merge 3 commits intogazebo-tooling:masterfrom
azeey wants to merge 3 commits intogazebo-tooling:masterfrom
Conversation
This also adds some documentation Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
scpeters
approved these changes
Sep 29, 2023
| set -e | ||
|
|
||
| git fetch --tags | ||
| PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') |
Contributor
There was a problem hiding this comment.
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.
Suggested change
| PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') | |
| PREV_VER=$(git describe --tags --match ${TO_BRANCH}* --abbrev=0 | sed 's/.*_//') |
Co-authored-by: Steve Peters <computersthatmove@gmail.com>
j-rivero
requested changes
Nov 2, 2023
| # | ||
| # Usage: | ||
| # $ ./merge_forward_pull_request.bash <from_branch> <to_branch> | ||
| # $ ./release_pull_request.bash <from_branch> <to_branch> |
Contributor
There was a problem hiding this comment.
Suggested change
| # $ ./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.
| # $ ./release_pull_request.bash <from_branch> <to_branch> | ||
| # | ||
| # For example, to merge `ign-rendering6` forward to `main`: | ||
| # For example, to release `gz-rendering7` 7.1.0 |
Contributor
There was a problem hiding this comment.
Suggested change
| # 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.
| set -e | ||
|
|
||
| git fetch --tags | ||
| PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//') |
| 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 |
Contributor
There was a problem hiding this comment.
Suggested change
| if [[ $PREV_VER == $VERSION ]] then | |
| if [[ "$PREV_VER" == "$VERSION" ]]; then |
Beware, this has a broken syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This also adds some documentation