Skip to content

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Sep 14, 2023

This also adds some documentation

This also adds some documentation

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested a review from j-rivero as a code owner September 14, 2023 20:35
set -e

git fetch --tags
PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//')
Copy link
Contributor

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.

Suggested change
PREV_VER=$(git describe --tags --abbrev=0 | sed 's/.*_//')
PREV_VER=$(git describe --tags --match ${TO_BRANCH}* --abbrev=0 | sed 's/.*_//')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

#
# Usage:
# $ ./merge_forward_pull_request.bash <from_branch> <to_branch>
# $ ./release_pull_request.bash <from_branch> <to_branch>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/.*_//')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ $PREV_VER == $VERSION ]] then
if [[ "$PREV_VER" == "$VERSION" ]]; then

Beware, this has a broken syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants