Introduce new versioning system based on GitInfo
Rob Mensching committed
Apr 16, 2021 at 23:35 UTC
a2f0de28fc0f1ab71d4685c77f0b21d946f3e702
14 files changed
+223
-63
appveyor.yml
+2
-2
@@ -21,6 +21,8 @@ environment:
21
build_script:
22
- appveyor.cmd
23
24
+test: off
25
+
26
pull_requests:
27
do_not_increment_build_number: true
28
@@ -30,8 +32,6 @@ nuget:
32
skip_branch_with_pr: true
33
skip_tags: true
34
33
-test: off
34
-
35
artifacts:
36
- path: build\Release\**\*.nupkg
37
name: nuget
signing.json
new
+13
@@ -0,0 +1,13 @@
1
+{
2
+ "SignClient": {
3
+ "AzureAd": {
4
+ "AADInstance": "https://login.microsoftonline.com/",
5
+ "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
6
+ "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
7
+ },
8
+ "Service": {
9
+ "Url": "https://codesign.dotnetfoundation.org/",
10
+ "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
11
+ }
12
+ }
13
+}
src/Directory.Build.props
+4
-1
@@ -8,7 +8,6 @@
8
<PropertyGroup>
9
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10
<EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
- <MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages>
11
12
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13
<BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
@@ -20,6 +19,10 @@
19
<Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20
<PackageLicenseExpression>MS-RL</PackageLicenseExpression>
21
<Product>WiX Toolset</Product>
22
+
23
+ <GitThisAssembly>false</GitThisAssembly>
24
+ <GitVersionFile>version.txt</GitVersionFile>
25
+ <GitBaseVersionRegex Condition="'$(GitBaseVersionRegex)' == ''">v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^(?<LABEL>[\dA-Za-z\-\.{}]+)\-v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>\d+|{[\dA-za-z\-\.]+})\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})$</GitBaseVersionRegex>
26
</PropertyGroup>
27
28
<Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " />
src/Directory.Build.targets
+89
-31
@@ -4,47 +4,105 @@
4
Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5
then update all of the repos.
6
-->
7
-<!--
8
- Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9
- See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10
--->
7
<Project>
8
<PropertyGroup>
13
- <ReplacePackageReferences>true</ReplacePackageReferences>
14
- <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15
- <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
9
+ <SigningToolFolder>$(BaseOutputPath)obj\.tools</SigningToolFolder>
10
+ <SigningToolExe>$(SigningToolFolder)\SignClient.exe</SigningToolExe>
11
+ <SigningFilelist>$(SigningToolFolder)\empty-filelist.txt</SigningFilelist>
12
+ <SigningConfiguration>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), signing.json))\signing.json</SigningConfiguration>
13
+ </PropertyGroup>
14
+
15
+ <Target Name="__FixupGitBaseVersion" BeforeTargets="_GitPopulateVersionInfo">
16
+ <PropertyGroup>
17
+ <GitBaseVersion>$(GitBaseVersion.Replace('{apiversion}', '$(ApiVersion)'))</GitBaseVersion>
18
+ <GitBaseVersion>$(GitBaseVersion.Replace('{height}', '$(GitCommits)'))</GitBaseVersion>
19
+ <GitBaseVersion>$(GitBaseVersion.Replace('{commits}', '$(GitCommits)'))</GitBaseVersion>
20
+ </PropertyGroup>
21
+ </Target>
22
+
23
+ <Target Name="__SetPropertiesFromGit" DependsOnTargets="GitVersion">
24
+ <PropertyGroup>
25
+ <AssemblyVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0</AssemblyVersion>
26
+ <FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</FileVersion>
27
+ <PackageVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)</PackageVersion>
28
+ <InformationalVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)+$(GitSha)</InformationalVersion>
29
+ <!-- We already included the $(GitSha) in the informational version so do not include it again. -->
30
+ <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
31
+ </PropertyGroup>
32
+
33
+ <Message Importance="$(GitInfoReportImportance)" Text="Properties from Git:
34
+ GitCommits: $(GitCommits)
35
+ AssemblyVersion: $(AssemblyVersion)
36
+ FileVersion: $(FileVersion)
37
+ InformationalVersion: $(InformationalVersion)
38
+ PackageVersion: $(PackageVersion)
39
+" />
40
+ </Target>
41
+
42
+ <PropertyGroup>
43
+ <GenerateNuspecDependsOn>
44
+ $(GenerateNuspecDependsOn);
45
+ __SetNuspecProperties
46
+ </GenerateNuspecDependsOn>
47
</PropertyGroup>
48
18
- <Choose>
19
- <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
49
+ <Target Name="__SetNuspecProperties" DependsOnTargets="__SetPropertiesFromGit"
50
+ Condition=" Exists('$(MSBuildProjectName).nuspec') ">
51
+ <PropertyGroup>
52
+ <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(GitRepositoryUrl)'!='' ">$(GitRepositoryUrl.Replace('.git',''))</ProjectUrl>
53
+
54
+ <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
55
+ <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$([System.IO.Path]::GetFullPath($(OutputPath)..))\</NuspecBasePath>
56
+ <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors="$(Authors)";Configuration=$(Configuration);Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"</NuspecProperties>
57
+ <NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(GitSha);RepositoryType=git;RepositoryUrl=$(GitRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
58
+ <PublishRepositoryUrl>true</PublishRepositoryUrl>
59
+ <SymbolPackageFormat>snupkg</SymbolPackageFormat>
60
+ </PropertyGroup>
61
+
62
+ <Message Importance="$(GitInfoReportImportance)" Text="NuSpec info:
63
+ NuspecFile: $(NuspecFile)
64
+ NuspecBasePath: $(NuspecBasePath)
65
+ NuspecProperties: $(NuspecProperties)
66
+" />
67
+
68
+ </Target>
69
+
70
+ <Target Name="PackNative" DependsOnTargets="__SetNuspecProperties"
71
+ Condition=" Exists('$(MSBuildProjectName).nuspec') ">
72
+
73
+ <Exec Command='nuget pack $(NuspecFile) -OutputDirectory "$(BaseOutputPath)$(Configuration)" -BasePath "$(NuspecBasePath)" -Properties $(NuspecProperties)'
74
+ WorkingDirectory="$(MSBuildProjectDirectory)" />
75
+
76
+ <ItemGroup>
77
+ <NuGetPackOutput Include="$(BaseOutputPath)$(Configuration)\**\$(PackageId)*.nupkg" />
78
+ </ItemGroup>
79
+ </Target>
80
+
81
+ <Target Name="_GetSignClient"
82
+ Condition=" !Exists('$(SigningToolExe)') ">
83
21
- <PropertyGroup>
22
- <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23
- <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24
- <RegexPattern>(?<="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25
- </PropertyGroup>
84
+ <WriteLinesToFile File='$(SigningFilelist)' Lines='do-not-sign-files-in-nupkg' Overwrite='true' />
85
27
- <ItemGroup>
28
- <!-- Keep the identity of the PackageReference -->
29
- <SmartPackageReference Include="@(PackageReference)">
30
- <PackageName>%(Identity)</PackageName>
31
- <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32
- </SmartPackageReference>
86
+ <Exec Command='dotnet.exe tool install --tool-path "$(SigningToolFolder)" SignClient' />
87
+ </Target>
88
34
- <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35
- <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36
- <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37
- <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38
- </PackageInSolution>
89
+ <Target Name="SignOutput" DependsOnTargets="_GetSignClient" AfterTargets="AfterBuild"
90
+ Condition=" '$(SigningUser)'!='' and '$(SignOutput)'!='false' and
91
+ ('$(MSBuildProjectExtension)'=='.csproj' or ('$(MSBuildProjectExtension)'=='.vcxproj' and '$(ConfigurationType)'!='StaticLibrary'))">
92
40
- <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
93
+ <Exec Command='"$(SigningToolExe)" sign -i $(TargetPath) -c "$(SigningConfiguration)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
94
+ WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
95
+ </Target>
96
42
- <!-- Remove the package references that are now referenced as projects -->
43
- <PackageReference Remove="@(PackageInSolution->'%(PackageName)')"/>
44
- </ItemGroup>
97
+ <Target Name="SignNupkg" DependsOnTargets="_GetSignClient" AfterTargets="Pack;PackNative"
98
+ Condition=" '$(SigningUser)'!='' and '@(NuGetPackOutput)'!='' and '$(SignNupkg)'!='false' ">
99
+ <ItemGroup>
100
+ <SigningNupkgs Include="@(NuGetPackOutput)" Condition=" '%(Extension)'=='.nupkg' " />
101
+ </ItemGroup>
102
46
- </When>
47
- </Choose>
103
+ <Exec Command='"$(SigningToolExe)" sign -i "@(SigningNupkgs->'%(Identity)')" -c "$(SigningConfiguration)" -f "$(SigningFilelist)" -n "WiX Toolset" -d "WiX Toolset" -u https://wixtoolset.org/ -r "$(SigningUser)" -s "$(SigningSecret)"'
104
+ WorkingDirectory="$(MSBuildProjectDirectory)" EchoOff="true" />
105
+ </Target>
106
107
<Import Project="Directory$(MSBuildProjectExtension).targets" Condition=" Exists('Directory$(MSBuildProjectExtension).targets') " />
108
<Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
src/Directory.csproj.targets
+1
-14
@@ -9,18 +9,5 @@
9
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
10
</PropertyGroup>
11
12
- <Target Name="SetNuspecProperties" DependsOnTargets="InitializeSourceControlInformation" AfterTargets="GetBuildVersion"
13
- Condition=" Exists('$(MSBuildProjectName).nuspec') ">
14
- <PropertyGroup>
15
- <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(PrivateRepositoryUrl)'!='' ">$(PrivateRepositoryUrl.Replace('.git',''))</ProjectUrl>
16
-
17
- <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
18
- <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(OutputPath)..\</NuspecBasePath>
19
- <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties>
20
- <NuspecProperties>$(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl)</NuspecProperties>
21
- <PublishRepositoryUrl>true</PublishRepositoryUrl>
22
- <SymbolPackageFormat>snupkg</SymbolPackageFormat>
23
- </PropertyGroup>
24
- </Target>
25
-
12
+ <Target Name="__SetAssemblyInfoFromGit" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="GetAssemblyVersion" />
13
</Project>
src/Directory.vcxproj.props
+8
-1
@@ -19,17 +19,22 @@
19
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
20
</PropertyGroup>
21
22
+ <PropertyGroup>
23
+ <CodeAnalysisRuleSet Condition=" Exists('$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset') ">$(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
24
+ </PropertyGroup>
25
+
26
<ItemDefinitionGroup>
27
<ClCompile>
28
<DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
29
<WarningLevel>Level4</WarningLevel>
30
<AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
27
- <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
31
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0600;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
32
<PrecompiledHeader>Use</PrecompiledHeader>
33
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
34
<CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
35
<TreatWarningAsError>true</TreatWarningAsError>
36
<ExceptionHandling>false</ExceptionHandling>
37
+ <ControlFlowGuard>Guard</ControlFlowGuard>
38
<AdditionalOptions>-YlprecompDefine</AdditionalOptions>
39
<AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
40
<MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation>
@@ -79,6 +84,7 @@
84
</ItemDefinitionGroup>
85
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
86
<ClCompile>
87
+ <ControlFlowGuard></ControlFlowGuard>
88
<BasicRuntimeChecks></BasicRuntimeChecks>
89
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
90
</ClCompile>
@@ -98,6 +104,7 @@
104
</ItemDefinitionGroup>
105
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
106
<ClCompile>
107
+ <ControlFlowGuard></ControlFlowGuard>
108
<BasicRuntimeChecks></BasicRuntimeChecks>
109
<RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
110
</ClCompile>
src/Directory.vcxproj.targets
new
+45
@@ -0,0 +1,45 @@
1
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
+<!--
3
+ Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.csproj.targets
4
+ then update all of the repos.
5
+-->
6
+<Project>
7
+ <PropertyGroup>
8
+ <PrepareForBuildDependsOn>
9
+ $(PrepareForBuildDependsOn);
10
+ __SetVersionResource
11
+ </PrepareForBuildDependsOn>
12
+ </PropertyGroup>
13
+
14
+ <Target Name="__SetVersionResource" DependsOnTargets="__SetPropertiesFromGit">
15
+ <PropertyGroup>
16
+ <_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP</_ResourceFileType>
17
+ <_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL</_ResourceFileType>
18
+ <Description Condition=" '$(Description)'=='' ">$(TargetName)</Description>
19
+ <Title Condition=" '$(Title)'=='' ">$(Description)</Title>
20
+ </PropertyGroup>
21
+
22
+ <ItemGroup>
23
+ <ResourceCompile Include="$(MSBuildThisFileDirectory)ver.rc">
24
+ <PreprocessorDefinitions>
25
+ %(PreprocessorDefinitions);
26
+ GITVER_FILEVER=$(FileVersion.Replace('.', ','));
27
+ GITVER_PRODUCTVER=$(AssemblyVersion.Replace('.', ','));
28
+ GITVER_FILE_VERSION=$(FileVersion);
29
+ GITVER_PRODUCT_VERSION=$(AssemblyVersion);
30
+ GITVER_FILE_TYPE=$(_ResourceFileType);
31
+ GITVER_CODEPAGE=0;
32
+ GITVER_LCID=$([System.Convert]::ToInt32('%(Culture)', 16));
33
+ GITVER_VERSION_BLOCK=$([System.Convert]::ToString($([MSBuild]::Multiply($([System.Convert]::ToUint64('%(Culture)', 16)), 65536)), 16).PadLeft(8, '0'));
34
+ GITVER_COMPANY=$(Company);
35
+ GITVER_COPYRIGHT=$(Copyright);
36
+ GITVER_TITLE=$(Title);
37
+ GITVER_PRODUCT=$(Product);
38
+ GITVER_INFORMATIONAL_VERSION=$(InformationalVersion);
39
+ GITVER_INTERNAL_NAME=$(TargetName);
40
+ GITVER_FILE_NAME=$(TargetFileName);
41
+ </PreprocessorDefinitions>
42
+ </ResourceCompile>
43
+ </ItemGroup>
44
+ </Target>
45
+</Project>
src/WixToolset.Core.Native/WixToolset.Core.Native.csproj
+1
-2
@@ -7,7 +7,6 @@
7
<TargetFramework>netstandard2.0</TargetFramework>
8
<DebugType>embedded</DebugType>
9
<Description>WiX Toolset Native Processing</Description>
10
- <IncludeSymbols>true</IncludeSymbols>
10
<CreateDocumentationFile>true</CreateDocumentationFile>
11
<!-- https://github.com/NuGet/Home/issues/10665 -->
12
<NoWarn>NU5128</NoWarn>
@@ -45,6 +44,6 @@
44
45
<ItemGroup>
46
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
48
- <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
47
+ <PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets="all" />
48
</ItemGroup>
49
</Project>
src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj
+2
@@ -17,6 +17,8 @@
17
</ItemGroup>
18
19
<ItemGroup>
20
+ <PackageReference Include="GitInfo" Version="2.1.2" />
21
+
22
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
23
<PackageReference Include="xunit" Version="2.4.1" />
24
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
src/test/version.txt
new
+1
@@ -0,0 +1 @@
1
+v42.42.{height}-preview.0
\ No newline at end of file
src/ver.rc
new
+55
@@ -0,0 +1,55 @@
1
+#pragma once
2
+// ------------------------------------------------------------------------------
3
+// <auto-generated>
4
+// This code was generated by a tool.
5
+// Runtime Version:4.0.30319.42000
6
+// Changes to this file may cause incorrect behavior and will be lost if
7
+// the code is regenerated.
8
+// </auto-generated>
9
+// ------------------------------------------------------------------------------
10
+
11
+#if defined(_UNICODE)
12
+#define GITVER_VERSION_STRING(x) L ## #x
13
+#else
14
+#define GITVER_VERSION_STRING(x) #x
15
+#endif
16
+
17
+#define GVS(x) GITVER_VERSION_STRING(x)
18
+
19
+#ifdef RC_INVOKED
20
+
21
+#include <winres.h>
22
+
23
+VS_VERSION_INFO VERSIONINFO
24
+ FILEVERSION GITVER_FILEVER
25
+ PRODUCTVERSION GITVER_PRODUCTVER
26
+ FILEFLAGSMASK 0x3FL
27
+#ifdef _DEBUG
28
+ FILEFLAGS 0x1L
29
+#else
30
+ FILEFLAGS 0x0L
31
+#endif
32
+ FILEOS 0x4L
33
+ FILETYPE GITVER_FILE_TYPE
34
+ FILESUBTYPE 0x0L
35
+BEGIN
36
+ BLOCK "StringFileInfo"
37
+ BEGIN
38
+ BLOCK GVS(GITVER_VERSION_BLOCK)
39
+ BEGIN
40
+ VALUE "CompanyName", GVS(GITVER_COMPANY)
41
+ VALUE "FileDescription", GVS(GITVER_TITLE)
42
+ VALUE "FileVersion", GVS(GITVER_FILE_VERSION)
43
+ VALUE "InternalName", GVS(GITVER_INTERNAL_NAME)
44
+ VALUE "OriginalFilename", GVS(GITVER_FILE_NAME)
45
+ VALUE "ProductName", GVS(GITVER_PRODUCT)
46
+ VALUE "ProductVersion", GVS(GITVER_INFORMATIONAL_VERSION)
47
+ VALUE "LegalCopyright", GVS(GITVER_COPYRIGHT)
48
+ END
49
+ END
50
+ BLOCK "VarFileInfo"
51
+ BEGIN
52
+ VALUE "Translation", GITVER_LCID, GITVER_CODEPAGE
53
+ END
54
+END
55
+#endif
src/wixnative/wixnative.vcxproj
+1
-1
@@ -69,7 +69,7 @@
69
<ItemGroup>
70
<PackageReference Include="WixToolset.Dutil" Version="4.0.72" />
71
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
72
- <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" />
72
+ <PackageReference Include="GitInfo" Version="2.1.2" />
73
</ItemGroup>
74
75
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
version.json
deleted
-11
@@ -1,11 +0,0 @@
1
-{
2
- "version": "4.0",
3
- "publicReleaseRefSpec": [
4
- "^refs/heads/master$"
5
- ],
6
- "cloudBuild": {
7
- "buildNumber": {
8
- "enabled": true
9
- }
10
- }
11
-}
version.txt
new
+1
@@ -0,0 +1 @@
1
+v4.{apiversion}-preview.0-build.{height}