From 7549c65502e26efdde0e695de863601c6971d586 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 8 Apr 2020 10:38:51 -0700 Subject: [PATCH] build: update matching regex for bazel stamping (#36523) Previously, the bazel stamping regex only matched on versions 0-9 for major and minor numbers, this update allows for matching on any number for major, minor or patch. PR Close #36523 --- tools/bazel_stamp_vars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bazel_stamp_vars.js b/tools/bazel_stamp_vars.js index 6d29b9d512..7368c57bfb 100644 --- a/tools/bazel_stamp_vars.js +++ b/tools/bazel_stamp_vars.js @@ -43,7 +43,7 @@ console.log(`BUILD_SCM_LOCAL_CHANGES ${LOCAL_CHANGES}`); // This will ignore non-version tags which would break unit tests expecting a valid version // number in the package headers const BUILD_SCM_VERSION_RAW = - _exec(`git describe --match [0-9].[0-9].[0-9]* --abbrev=7 --tags HEAD`); + _exec(`git describe --match [0-9]*.[0-9]*.[0-9]* --abbrev=7 --tags HEAD`); // Reformat `git describe` version string into a more semver-ish string // From: 5.2.0-rc.0-57-g757f886