Skip to content

Commit

Permalink
[7.2.0] Fix version detection logic in release branches (bazelbuild#2…
Browse files Browse the repository at this point in the history
…2391)

PiperOrigin-RevId: 621452493
Change-Id: I812062db638f171e9e2dcb570f1797cf5118984e

Commit
bazelbuild@31b522f

Co-authored-by: Googler <fwe@google.com>
  • Loading branch information
bazel-io and fweikert authored May 16, 2024
1 parent e9b59e5 commit d198558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/docs/get_workspace_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

RELEASE_NAME=$(source scripts/release/common.sh; get_full_release_name)
RELEASE_NAME=$(source scripts/release/common.sh; get_release_name)

if [[ -z "$RELEASE_NAME" ]]; then
echo BUILD_SCM_REVISION UNSAFE_"$(git rev-parse --abbrev-ref HEAD)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function get_release_candidate() {
function get_release_name() {
# Match branch name release-X.X.X[-pre.XXXXXXXX.X]rcY and return X.X.X[-pre.XXXXXXXX.X]
# or match tag name X.X.X[-pre.XXXXXXXX.X] and return X.X.X[-pre.XXXXXXXX.X]
git_get_branch 2>/dev/null | grep -Po "(?<=release-)([0-9]|\.)*(-pre\.[0-9]{8}(\.[0-9]+){1,2})?(?=rc)" || git_get_tag | grep -Po "^([0-9]|\.)*(-pre\.[0-9]{8}(\.[0-9]+){1,2})?$" || true
git_get_branch 2>/dev/null | grep -Po "(?<=release-)([0-9]|\.)*(-pre\.[0-9]{8}(\.[0-9]+){1,2})?(?=rc)?" || git_get_tag | grep -Po "^([0-9]|\.)*(-pre\.[0-9]{8}(\.[0-9]+){1,2})?$" || true
}

# Returns whether this is a rolling release (or an RCs of one)
Expand Down

0 comments on commit d198558

Please sign in to comment.