summaryrefslogtreecommitdiffstats
path: root/PCbuild/pythoncore.vcxproj
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-03-04 05:20:37 (GMT)
committerGitHub <noreply@github.com>2017-03-04 05:20:37 (GMT)
commita0c07d2edd345d2867f97ac31822c9544f9cbcf0 (patch)
treeee1449a5076df1ec37c30ed956b96e17f29a0f6e /PCbuild/pythoncore.vcxproj
parent5c4b0d063aba0a68c325073f5f312a2c9f40d178 (diff)
downloadcpython-a0c07d2edd345d2867f97ac31822c9544f9cbcf0.zip
cpython-a0c07d2edd345d2867f97ac31822c9544f9cbcf0.tar.gz
cpython-a0c07d2edd345d2867f97ac31822c9544f9cbcf0.tar.bz2
bpo-27593: Updates Windows build to use information from git (#262)
* bpo-27593: Updates Windows build to use information from git
Diffstat (limited to 'PCbuild/pythoncore.vcxproj')
-rw-r--r--PCbuild/pythoncore.vcxproj24
1 files changed, 12 insertions, 12 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index c18c174..e373a91 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -408,24 +408,24 @@
</ImportGroup>
<Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
<PropertyGroup>
- <HG Condition="$(HG) == ''">hg</HG>
- <_HG>$(HG)</_HG>
- <_HG Condition="$(HG.Contains(` `))">"$(HG)"</_HG>
+ <GIT Condition="$(GIT) == ''">git</GIT>
+ <_GIT>$(GIT)</_GIT>
+ <_GIT Condition="$(GIT.Contains(` `))">"$(GIT)"</_GIT>
</PropertyGroup>
- <Message Text="Getting build info from $(_HG)" Importance="high" />
+ <Message Text="Getting build info from $(_GIT)" Importance="high" />
<MakeDir Directories="$(IntDir)" Condition="!Exists($(IntDir))" />
- <Exec Command="$(_HG) id -b &gt; &quot;$(IntDir)hgbranch.txt&quot;" ContinueOnError="true" />
- <Exec Command="$(_HG) id -i &gt; &quot;$(IntDir)hgversion.txt&quot;" ContinueOnError="true" />
- <Exec Command="$(_HG) id -t &gt; &quot;$(IntDir)hgtag.txt&quot;" ContinueOnError="true" />
+ <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 id -t &gt; &quot;$(IntDir)gittag.txt&quot;" ContinueOnError="true" />
<PropertyGroup>
- <HgBranch Condition="Exists('$(IntDir)hgbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim())</HgBranch>
- <HgVersion Condition="Exists('$(IntDir)hgversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim())</HgVersion>
- <HgTag Condition="Exists('$(IntDir)hgtag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim())</HgTag>
+ <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>
+ <GitTag Condition="Exists('$(IntDir)gittag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)gittag.txt').Trim())</GitTag>
</PropertyGroup>
- <Message Text="Building $(HgTag):$(HgVersion) $(HgBranch)" Importance="high" />
+ <Message Text="Building $(GitTag):$(GitVersion) $(GitBranch)" Importance="high" />
<ItemGroup>
<ClCompile Include="..\Modules\getbuildinfo.c">
- <PreprocessorDefinitions>HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>GITVERSION="$(GitVersion)";GITTAG="$(GitTag)";GITBRANCH="$(GitBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
</Target>