Skip to content
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

release script update #3383

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions scripts/release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ default()

UI_DIR="$TMP_DIR/koku-ui"
UI_REPO="[email protected]:project-koku/koku-ui.git"

BODY_FILE="$UI_DIR/body"
}

usage()
Expand Down Expand Up @@ -49,6 +51,14 @@ clone()
git clone $UI_REPO
}

createPullRequestBody()
{
cat <<- EEOOFF > $BODY_FILE
Merged $REMOTE_BRANCH branch to $BRANCH.

Use latest commit to update namespace \`ref\` in app-interface repo. Don't use merge commit, SHAs must be unique when images are created for each branch.
EEOOFF
}

merge()
{
Expand All @@ -67,15 +77,15 @@ merge()
# Use gh in a non-interactive way -- see https://github.com/cli/cli/issues/1718
pullRequest()
{
NEW_BRANCH="release/${BRANCH}.$$"
NEW_BRANCH="release_${BRANCH}.$$"

git branch -m $NEW_BRANCH

echo "\n*** Pushing $NEW_BRANCH..."
git push -u origin HEAD

TITLE="Deployment commit for $BRANCH"
BODY="Merged $REMOTE_BRANCH branch to $BRANCH. Use latest commit to update namespace \`ref\` in app-interface repo. Don't use merge commit, SHAs must be unique when images are created for each branch."
BODY=`cat $BODY_FILE`

gh pr create -t "$TITLE" -b "$BODY" -B $BRANCH
}
Expand Down Expand Up @@ -124,6 +134,7 @@ push()
if [ -n "$PUSH" ]; then
push
else
createPullRequestBody
pullRequest
fi
else
Expand Down
Loading