summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2017-03-21 04:35:51 (GMT)
committerGitHub <noreply@github.com>2017-03-21 04:35:51 (GMT)
commited512cba78af211da4d83cbb7cc533c39176f374 (patch)
tree7e0abb552c3539ee23ebc6086f59ebb7023707b6
parent4276068fe57e93b4c8d428f0b1cde8ca04b8fb99 (diff)
downloadcpython-ed512cba78af211da4d83cbb7cc533c39176f374.zip
cpython-ed512cba78af211da4d83cbb7cc533c39176f374.tar.gz
cpython-ed512cba78af211da4d83cbb7cc533c39176f374.tar.bz2
bpo-27593: Revise git SCM build info. (#744) (#746)
Use --short form of git hash. Use output from "git describe" for tag. Expected outputs: 1. previous hg 2. previous git 3. updated git Release (tagged) build: 1. Python 3.7.0a0 (v3.7.0a0:4def2a2901a5, ... 2. Python 3.7.0a0 (v3.7.0a0^0:05f53735c8912f8df1077e897f052571e13c3496, ... 3. Python 3.7.0a0 (v3.7.0a0:05f53735c8, ... Development build: 1. Python 3.7.0a0 (default:41df79263a11, ... 2. Python 3.7.0a0 (master:05f53735c8912f8df1077e897f052571e13c3496, ... 3. Python 3.7.0a0 (heads/master-dirty:05f53735c8, ... "dirty" means the working tree has uncommitted changes. See "git help describe" for more info. (cherry picked from commit 554626ada769abf82a5dabe6966afa4265acb6a6)
-rw-r--r--PCbuild/pythoncore.vcxproj4
-rwxr-xr-xconfigure4
-rw-r--r--configure.ac4
3 files changed, 6 insertions, 6 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index b7e0f3c..6466a6b 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -407,8 +407,8 @@
<Message Text="Getting build info from $(_GIT)" Importance="high" />
<MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />
<Exec Command="$(_GIT) name-rev --name-only HEAD &gt; &quot;$(IntDir)gitbranch.txt&quot;" ContinueOnError="true" />
- <Exec Command="$(_GIT) rev-parse HEAD &gt; &quot;$(IntDir)gitversion.txt&quot;" ContinueOnError="true" />
- <Exec Command="$(_GIT) name-rev --tags --name-only HEAD &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
+ <Exec Command="$(_GIT) rev-parse --short HEAD &gt; &quot;$(IntDir)gitversion.txt&quot;" ContinueOnError="true" />
+ <Exec Command="$(_GIT) describe --all --always --dirty &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
<PropertyGroup>
<GitBranch Condition="Exists('$(IntDir)gitbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitbranch.txt').Trim())</GitBranch>
<GitVersion Condition="Exists('$(IntDir)gitversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gitversion.txt').Trim())</GitVersion>
diff --git a/configure b/configure
index 640cad7..0f74842 100755
--- a/configure
+++ b/configure
@@ -2884,8 +2884,8 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
- GITVERSION="git -C \$(srcdir) rev-parse HEAD"
- GITTAG="git -C \$(srcdir) name-rev --tags --name-only HEAD"
+ GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
+ GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
else
GITVERSION=""
diff --git a/configure.ac b/configure.ac
index 4682341..0eca886 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,8 +37,8 @@ HAS_GIT=no-repository
fi
if test $HAS_GIT = found
then
- GITVERSION="git -C \$(srcdir) rev-parse HEAD"
- GITTAG="git -C \$(srcdir) name-rev --tags --name-only HEAD"
+ GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
+ GITTAG="git -C \$(srcdir) describe --all --always --dirty"
GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
else
GITVERSION=""