summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-05-07 13:29:58 -0400
committerMathew Robinson <chasinglogic@gmail.com>2019-05-07 13:54:44 -0400
commit14c4a6e66351e07b1965622b4e8fb8d5bf0a04e2 (patch)
tree005002edacd42c0da392acabccc36d981c9599bd
parentef53c85ff0d5f19d82a240f54f2cbc22fa8687b4 (diff)
downloadmongo-14c4a6e66351e07b1965622b4e8fb8d5bf0a04e2.tar.gz
SERVER-41038 Guarantee that git describe returns the same number of digits regardless of version
-rw-r--r--buildscripts/utils.py4
-rw-r--r--etc/distributed_correctness.yml2
-rw-r--r--etc/evergreen.yml4
-rw-r--r--etc/longevity.yml2
-rw-r--r--etc/perf.yml4
-rw-r--r--etc/system_perf.yml4
6 files changed, 10 insertions, 10 deletions
diff --git a/buildscripts/utils.py b/buildscripts/utils.py
index e70b7a98553..4e2edcc76e5 100644
--- a/buildscripts/utils.py
+++ b/buildscripts/utils.py
@@ -95,9 +95,9 @@ def get_git_version():
def get_git_describe():
- """Return 'git describe'."""
+ """Return 'git describe --abbrev=7'."""
with open(os.devnull, "r+") as devnull:
- proc = subprocess.Popen("git describe", stdout=subprocess.PIPE, stderr=devnull,
+ proc = subprocess.Popen("git describe --abbrev=7", stdout=subprocess.PIPE, stderr=devnull,
stdin=devnull, shell=True)
return proc.communicate()[0].strip().decode('utf-8')
diff --git a/etc/distributed_correctness.yml b/etc/distributed_correctness.yml
index 154f564347e..3e9c8642c35 100644
--- a/etc/distributed_correctness.yml
+++ b/etc/distributed_correctness.yml
@@ -230,7 +230,7 @@ tasks:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ MONGO_VERSION=$(git describe --abbrev=7)
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
if [ "${is_patch|}" = "true" ]; then
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 650bd9e6cf6..909a40fff4c 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -518,7 +518,7 @@ functions:
fi
# For compile bypass we need to skip the binary version check since we can tag a commit
# after the base commit binaries were created. This would lead to a mismatch of the binaries
- # and the version from git describe in the compile_expansions.yml.
+ # and the version from git describe --abbrev=7 in the compile_expansions.yml.
if [ "${is_patch}" = "true" ] && [ "${bypass_compile|false}" = "true" ]; then
echo "Skipping binary version check since we are bypassing compile in this patch build."
exit 0
@@ -1590,7 +1590,7 @@ functions:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ MONGO_VERSION=$(git describe --abbrev=7)
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
if [ "${is_patch}" = "true" ] && [ "${bypass_compile|false}" = "false" ]; then
diff --git a/etc/longevity.yml b/etc/longevity.yml
index d2535f3c21d..4fb75fcef8a 100644
--- a/etc/longevity.yml
+++ b/etc/longevity.yml
@@ -201,7 +201,7 @@ tasks:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ MONGO_VERSION=$(git describe --abbrev=7)
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
if [ "${is_patch|}" = "true" ]; then
diff --git a/etc/perf.yml b/etc/perf.yml
index 672731d48ec..69bd3ab6ebe 100644
--- a/etc/perf.yml
+++ b/etc/perf.yml
@@ -93,7 +93,7 @@ functions:
chmod +x mongo
git clone git@github.com:mongodb/mongo-perf.git perf
cd perf
- git describe --tags
+ git describe --abbrev=7 --tags
- command: shell.exec
params:
background: true
@@ -263,7 +263,7 @@ tasks:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ MONGO_VERSION=$(git describe --abbrev=7)
# If this is a patch build, we add the patch version id to the version string so we know
# this build was a patch, and which evergreen task it came from
if [ "${is_patch|}" = "true" ]; then
diff --git a/etc/system_perf.yml b/etc/system_perf.yml
index 480825791b5..c36878f6d82 100644
--- a/etc/system_perf.yml
+++ b/etc/system_perf.yml
@@ -95,12 +95,12 @@ functions:
set -o verbose
# We get the raw version string (r1.2.3-45-gabcdef) from git
- MONGO_VERSION=$(git describe)
+ MONGO_VERSION=$(git describe --abbrev=7)
# If we're going to compile the upstream wtdevelop repository for wiredtiger, add
# that githash to version string.
if [ "${compile-variant|}" = "-wtdevelop" ]; then
- WT_VERSION=$(cd src/third_party/wtdevelop; git describe | cut -c 9-)
+ WT_VERSION=$(cd src/third_party/wtdevelop; git describe --abbrev=7 | cut -c 9-)
MONGO_VERSION="$MONGO_VERSION-wtdevelop-$WT_VERSION"
fi
# If this is a patch build, we add the patch version id to the version string so we know