Skip to content

Commit

Permalink
Use RELEASE_VERSION instead of BUILDKITE_RELEASE_VERSION
Browse files Browse the repository at this point in the history
The `BUILDKITE_` prefix is a workaround required only on iOS.
We could adopt it for consistency here, too, but it's best to avoid it
for two reasons:

1. Being a workaround, one would hope to eventually remove it
2. The less coupled we are with the particular CI implementation details
   (i.e. "Buildkite" in the name) the better
  • Loading branch information
mokagio committed Sep 10, 2024
1 parent bb90134 commit bfea8bc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .buildkite/commands/checkout-release-branch.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#!/bin/bash -eu

# We expect BUILDKITE_RELEASE_VERSION to be as an environment variable, e.g. by the automation that triggers the build on Buildkite.
# It must use the `BUILDKITE_` prefix to be passed to the agent due to how `hostmgr` works, in case this runs on a Mac agents.
if [[ -z "${BUILDKITE_RELEASE_VERSION}" ]]; then
echo "BUILDKITE_RELEASE_VERSION is not set."
if [[ -z "${RELEASE_VERSION}" ]]; then
echo "RELEASE_VERSION is not set."
exit 1
fi

# Buildkite, by default, checks out a specific commit.
# For many release actions, we need to be on a release branch instead.
BRANCH_NAME="release/${BUILDKITE_RELEASE_VERSION}"
BRANCH_NAME="release/${RELEASE_VERSION}"
git fetch origin "$BRANCH_NAME"
git checkout "$BRANCH_NAME"

0 comments on commit bfea8bc

Please sign in to comment.