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 833cbda commit 9dbe731
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/scripts/release-create-tracking-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
# 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
20 changes: 11 additions & 9 deletions .github/workflows/scripts/release-prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ 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 @@ -39,15 +39,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 9dbe731

Please sign in to comment.