This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#855 add AssemblyInformationalVersion with git sha
- Loading branch information
Showing
2 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<project name="OpenCover" > | ||
|
||
<target name="netfx.tools" > | ||
<fail message="Please install 'Microsoft Windows SDK for Windows 8 and .NET Framework'" unless="${directory::exists(netfx.tools.folder)}" /> | ||
</target> | ||
<target name="netfx.tools" > | ||
<fail message="Please install 'Microsoft Windows SDK for Windows 8 and .NET Framework'" unless="${directory::exists(netfx.tools.folder)}" /> | ||
</target> | ||
|
||
<target name="create-snk" depends="netfx.tools"> | ||
<property name="source.opencover.snk.file" value="${build.folder}\..\..\..\keys\opencover.snk" /> | ||
<property name="opencover.snk.file" value="${build.folder}\Version\opencover.snk" /> | ||
<property name="opencover.public.snk.file" value="${build.folder}\Version\opencover.public.snk" /> | ||
<target name="create-snk" depends="netfx.tools"> | ||
<property name="source.opencover.snk.file" value="${build.folder}\..\..\..\keys\opencover.snk" /> | ||
<property name="opencover.snk.file" value="${build.folder}\Version\opencover.snk" /> | ||
<property name="opencover.public.snk.file" value="${build.folder}\Version\opencover.public.snk" /> | ||
|
||
<copy file="${source.opencover.snk.file}" todir="${build.folder}\Version" | ||
if="${file::exists(source.opencover.snk.file) and not file::exists(opencover.snk.file)}" /> | ||
<copy file="${source.opencover.snk.file}" todir="${build.folder}\Version" | ||
if="${file::exists(source.opencover.snk.file) and not file::exists(opencover.snk.file)}" /> | ||
|
||
<exec program="${netfx.tools.folder}\sn.exe" commandline='-k "${opencover.snk.file}"' unless="${file::exists(opencover.snk.file)}"/> | ||
<exec program="${netfx.tools.folder}\sn.exe" commandline='-p "${opencover.snk.file}" "${opencover.public.snk.file}"' unless="${file::exists(opencover.public.snk.file)}"/> | ||
</target> | ||
<exec program="${netfx.tools.folder}\sn.exe" commandline='-k "${opencover.snk.file}"' unless="${file::exists(opencover.snk.file)}"/> | ||
<exec program="${netfx.tools.folder}\sn.exe" commandline='-p "${opencover.snk.file}" "${opencover.public.snk.file}"' unless="${file::exists(opencover.public.snk.file)}"/> | ||
</target> | ||
|
||
<target name="get-version-number" > | ||
<echo file="${build.folder}\Version\Version.cs">using System.Reflection;
</echo> | ||
<echo file="${build.folder}\Version\Version.cs" append="true">[assembly: AssemblyVersion("${buildnumber.version}")]
</echo> | ||
<echo file="${build.folder}\Version\Version.cs" append="true">[assembly: AssemblyFileVersion("${buildnumber.version}")]
</echo> | ||
<echo file="${build.folder}\Version\Version.cs">using System.Reflection;
</echo> | ||
<echo file="${build.folder}\Version\Version.cs" append="true">[assembly: AssemblyVersion("${buildnumber.version}")]
</echo> | ||
<echo file="${build.folder}\Version\Version.cs" append="true">[assembly: AssemblyFileVersion("${buildnumber.version}")]
</echo> | ||
<echo file="${build.folder}\Version\Version.cs" append="true">[assembly: AssemblyInformationalVersion("${buildnumber.version}-${ci.gitSha}")]
</echo> | ||
|
||
<echo file="${build.folder}\Version\Version.h">#define FILEVER ${buildnumber.major},${buildnumber.minor},${buildnumber.build},${buildnumber.revision}
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define PRODUCTVER ${buildnumber.major},${buildnumber.minor},${buildnumber.build},${buildnumber.revision}
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define STRFILEVER "${buildnumber.version}"
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define STRPRODUCTVER "${buildnumber.version}"
</echo> | ||
<echo file="${build.folder}\Version\Version.h">#define FILEVER ${buildnumber.major},${buildnumber.minor},${buildnumber.build},${buildnumber.revision}
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define PRODUCTVER ${buildnumber.major},${buildnumber.minor},${buildnumber.build},${buildnumber.revision}
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define STRFILEVER "${buildnumber.version}"
</echo> | ||
<echo file="${build.folder}\Version\Version.h" append="true">#define STRPRODUCTVER "${buildnumber.version}"
</echo> | ||
|
||
<echo file="${build.folder}\Version\Version.wxi"><?define Version = "${buildnumber.major}.${buildnumber.minor}.${buildnumber.build}.${buildnumber.revision}" ?>
</echo> | ||
<echo file="${build.folder}\Version\Version.wxi" append="true"><Include />
</echo> | ||
<echo file="${build.folder}\Version\Version.wxi"><?define Version = "${buildnumber.major}.${buildnumber.minor}.${buildnumber.build}.${buildnumber.revision}" ?>
</echo> | ||
<echo file="${build.folder}\Version\Version.wxi" append="true"><Include />
</echo> | ||
</target> | ||
|
||
<target name="get-os-version" > | ||
<property name="machine.os" value="${environment::get-operating-system()}" /> | ||
<property name="machine.version" value="${operating-system::get-version(environment::get-operating-system())}" /> | ||
<echo message="${machine.os} => ${machine.version}" /> | ||
<property name="machine.os" value="${environment::get-operating-system()}" /> | ||
<property name="machine.version" value="${operating-system::get-version(environment::get-operating-system())}" /> | ||
<echo message="${machine.os} => ${machine.version}" /> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters