Skip to content

Commit

Permalink
[chore] Do not include unreleased versions in the release titles (#7640)
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 authored May 8, 2023
1 parent 833cbda commit 83cbdac
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
Expand Up @@ -14,15 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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 @@ -19,17 +19,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 107717825+opentelemetrybot@users.noreply.github.com
BRANCH="prepare-release-prs/${CANDIDATE_BETA}"
Expand All @@ -39,15 +38,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 83cbdac

Please sign in to comment.