Skip to content

Commit

Permalink
[chore] Do not include unreleased versions in the release titles
Browse files Browse the repository at this point in the history
Update release scripts to not include unreleased version in the release titles
  • Loading branch information
dmitryax committed May 8, 2023
1 parent 9ef0c34 commit 8de6210
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/scripts/release-create-tracking-issue.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#!/bin/bash -ex

STABLE="${CANDIDATE_STABLE}"
if [ "${STABLE}" == "" ]; then
STABLE="${CURRENT_STABLE}"
RELEASE_VERSION=v${CANDIDATE_STABLE}/v${CANDIDATE_BETA}
if [ "${CANDIDATE_STABLE}" == "" ]; then
RELEASE_VERSION="v${CANDIDATE_BETA}"
fi
BETA="${CANDIDATE_BETA}"
if [ "${BETA}" == "" ]; then
BETA="${CURRENT_BETA}"
if [ "${CANDIDATE_BETA}" == "" ]; then
RELEASE_VERSION="v${CANDIDATE_STABLE}"
fi
RELEASE_VERSION=v${STABLE}/v${BETA}

EXISTING_ISSUE=$( gh issue list --search "Release ${RELEASE_VERSION}" --json url --jq '.[].url' --repo "${REPO}" )

Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/scripts/release-prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ if [ "${CANDIDATE_STABLE}" == "" ] && [ "${CANDIDATE_BETA}" == "" ]; then
exit 1
fi

STABLE="${CANDIDATE_STABLE}"
if [ "${STABLE}" == "" ]; then
STABLE="${CURRENT_STABLE}"
RELEASE_VERSION=v${CANDIDATE_STABLE}/v${CANDIDATE_BETA}
if [ "${CANDIDATE_STABLE}" == "" ]; then
RELEASE_VERSION="v${CANDIDATE_BETA}"
fi
BETA="${CANDIDATE_BETA}"
if [ "${BETA}" == "" ]; then
BETA="${CURRENT_BETA}"
if [ "${CANDIDATE_BETA}" == "" ]; then
RELEASE_VERSION="v${CANDIDATE_STABLE}"
fi
RELEASE_VERSION=v${STABLE}/v${BETA}

make chlog-update VERSION="${RELEASE_VERSION}"
COMMANDS="- make chlog-update VERSION=${RELEASE_VERSION}"
git config user.name opentelemetrybot
git config user.email [email protected]
BRANCH="prepare-release-prs/${CANDIDATE_BETA}"
Expand All @@ -25,15 +24,17 @@ git commit -m "Changelog update ${RELEASE_VERSION}"

if [ "${CANDIDATE_STABLE}" != "" ]; then
make prepare-release GH=none PREVIOUS_VERSION="${CURRENT_STABLE}" RELEASE_CANDIDATE="${CANDIDATE_STABLE}" MODSET=stable
COMMANDS+="
- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_STABLE} RELEASE_CANDIDATE=${CANDIDATE_STABLE} MODSET=stable"
fi
if [ "${CANDIDATE_BETA}" != "" ]; then
make prepare-release GH=none PREVIOUS_VERSION="${CURRENT_BETA}" RELEASE_CANDIDATE="${CANDIDATE_BETA}" MODSET=beta
COMMANDS+="
- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_BETA} RELEASE_CANDIDATE=${CANDIDATE_BETA} MODSET=beta"
fi
git push origin "${BRANCH}"

gh pr create --title "[chore] Prepare release ${RELEASE_VERSION}" --body "
The following commands were run to prepare this release:
- make chlog-update VERSION=${RELEASE_VERSION}
- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_STABLE} RELEASE_CANDIDATE=${CANDIDATE_STABLE} MODSET=stable
- make prepare-release GH=none PREVIOUS_VERSION=${CURRENT_BETA} RELEASE_CANDIDATE=${CANDIDATE_BETA} MODSET=beta
${COMMANDS}
"

0 comments on commit 8de6210

Please sign in to comment.