@joebigelow / wix / commits / 4983aeeb

Move to ReleaseFlow and SomeVer

Rob Mensching committed Apr 7, 2024 at 03:26 UTC 4983aeeb2da6e96bc8aad698752b3b962f58e585
30 files changed +245 -279
.github/workflows/build.yml
+1 -1
@@ -4,6 +4,7 @@ on:
4 push:
5 branches:
6 - main
7 + - master
8 pull_request:
9 branches:
10 - main
@@ -30,7 +31,6 @@ jobs:
31 uses: actions/checkout@v4
32 with:
33 fetch-depth: 0
33 - filter: tree:0
34
35 # - name: Configure Visual Studio
36 # shell: cmd
.gitignore
+1 -2
@@ -393,8 +393,7 @@ FodyWeavers.xsd
393 # Ignore global.json and Directory.Package.props since they are generated
394 global.json
395 Directory.Packages.props
396 -build/wixver.props
397 -build/ThisAssembly.WixVer.cs
396 +build/SomeVerInfo.*
397
398 # Ignore downloaded tools
399 build/.tools/
src/Directory.Build.props
-4
@@ -32,11 +32,7 @@
32 <ProjectUrl>https://wixtoolset.org/</ProjectUrl>
33 <PackageIcon>wix.png</PackageIcon>
34
35 - <GitThisAssembly>false</GitThisAssembly>
35 <GitVersionFile>version.txt</GitVersionFile>
37 - <GitIgnoreTagVersion>true</GitIgnoreTagVersion>
38 - <GitInfoReportImportance>low</GitInfoReportImportance>
39 - <GitBaseVersionRegex Condition="'$(GitBaseVersionRegex)' == ''">v?(?&lt;MAJOR&gt;\d+|{[\dA-za-z\-\.]+})\.(?&lt;MINOR&gt;(\d+|{[\dA-za-z\-\.]+}))(?:\-(?&lt;LABEL&gt;[\dA-Za-z\-\.{}]+))?$|^v?(?&lt;MAJOR&gt;\d+|{[\dA-za-z\-\.]+})\.(?&lt;MINOR&gt;(\d+|{[\dA-za-z\-\.]+}))\.(?&lt;PATCH&gt;\d+|{[\dA-za-z\-\.]+})(?:\-(?&lt;LABEL&gt;[\dA-Za-z\-\.{}]+))?$|^(?&lt;LABEL&gt;[\dA-Za-z\-\.{}]+)\-v?(?&lt;MAJOR&gt;\d+|{[\dA-za-z\-\.]+})\.(?&lt;MINOR&gt;\d+|{[\dA-za-z\-\.]+})\.(?&lt;PATCH&gt;\d+|{[\dA-za-z\-\.]+})$</GitBaseVersionRegex>
36 </PropertyGroup>
37
38 <Import Project="Directory$(MSBuildProjectExtension).props" Condition=" Exists('Directory$(MSBuildProjectExtension).props') " />
src/Directory.Build.targets
+11 -62
@@ -16,93 +16,42 @@
16 <ProjectCapability Remove="TestContainer" />
17 </ItemGroup>
18
19 - <!-- If the GitInfo package wasn't imported, use the calculated version properties. -->
20 - <Import Project="$(RootBuildFolder)wixver.props" Condition=" '$(GitInfoImported)'!='true' " />
21 -
22 - <Target Name="__FixupGitBaseVersion" BeforeTargets="_GitPopulateVersionInfo">
23 - <PropertyGroup>
24 - <GitBaseVersion>$(GitBaseVersion.Replace('{apiversion}', '$(ApiVersion)'))</GitBaseVersion>
25 - <GitBaseVersion>$(GitBaseVersion.Replace('{height}', '$(GitCommits)'))</GitBaseVersion>
26 - <GitBaseVersion>$(GitBaseVersion.Replace('{commits}', '$(GitCommits)'))</GitBaseVersion>
27 - </PropertyGroup>
28 - </Target>
19 + <!-- If the git information wasn't imported yet, import the cached git information. -->
20 + <Import Project="$(RootBuildFolder)SomeVerInfo.props" Condition=" '$(SomeVerInfoImported)'!='true' " />
21 + <Import Project="internal/SetBuildNumber/SomeVerInfo.targets" />
22
23 <PropertyGroup>
31 - <GetPackageVersionDependsOn>
32 - $(GetPackageVersionDependsOn);
33 - __SetPropertiesFromGit;
34 - </GetPackageVersionDependsOn>
35 -
36 - <__SetPropertiesFromGitDependsOn Condition=" '$(GitInfoFromCache)'!='true' ">
37 - GitVersion
38 - </__SetPropertiesFromGitDependsOn>
39 - </PropertyGroup>
40 -
41 - <Target Name="__SetPropertiesFromGit" DependsOnTargets="$(__SetPropertiesFromGitDependsOn)">
42 - <PropertyGroup>
43 - <AssemblyVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0</AssemblyVersion>
44 - <FileVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits)</FileVersion>
45 - <PackageVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)</PackageVersion>
46 - <MajorMinorVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor)</MajorMinorVersion>
47 - <Version>$(PackageVersion)</Version>
48 - <InformationalVersion>$(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)+$(GitSha)</InformationalVersion>
49 - <!-- We already included the $(GitSha) in the informational version so do not include it again. -->
50 - <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
51 -
52 - <RepositoryUrl Condition=" '$(RepositoryUrl)'=='' and '$(GitRepositoryUrl)'!='' ">$(GitRepositoryUrl.Replace('.git',''))</RepositoryUrl>
53 - <RepositoryType Condition=" '$(RepositoryType)'=='' ">git</RepositoryType>
54 - <RepositoryCommit Condition=" '$(RepositoryCommit)'=='' ">$(GitSha)</RepositoryCommit>
55 - <PublishRepositoryUrl>true</PublishRepositoryUrl>
56 -
57 - <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(RepositoryUrl)'!='' ">$(RepositoryUrl)</ProjectUrl>
58 -
59 - <WixMajorVersion>$(GitBaseVersionMajor)</WixMajorVersion>
60 - <WixMinorVersion>$(GitBaseVersionMinor)</WixMinorVersion>
61 - <WixPatchVersion>$(GitBaseVersionPatch)</WixPatchVersion>
62 - </PropertyGroup>
24 + <RepositoryUrl Condition=" '$(RepositoryUrl)'=='' ">https://github.com/wixtoolset/wix</RepositoryUrl>
25 + <RepositoryType Condition=" '$(RepositoryType)'=='' ">git</RepositoryType>
26 + <RepositoryCommit Condition=" '$(RepositoryCommit)'=='' ">$(SomeVerInfoSha)</RepositoryCommit>
27 + <PublishRepositoryUrl>true</PublishRepositoryUrl>
28
64 - <Message Importance="$(GitInfoReportImportance)" Text="Properties from Git:
65 - GitCommits: $(GitCommits)
66 - AssemblyVersion: $(AssemblyVersion)
67 - FileVersion: $(FileVersion)
68 - InformationalVersion: $(InformationalVersion)
69 - PackageVersion: $(PackageVersion)
70 -" />
71 - </Target>
29 + <ProjectUrl Condition=" '$(ProjectUrl)'=='' and '$(RepositoryUrl)'!='' ">$(RepositoryUrl)</ProjectUrl>
30 + </PropertyGroup>
31
32 <PropertyGroup>
33 <GenerateNuspecDependsOn>
34 $(GenerateNuspecDependsOn);
76 - __SetPropertiesFromGit;
35 __SetNuspecProperties
36 </GenerateNuspecDependsOn>
37 </PropertyGroup>
38
81 - <Target Name="__SetNuspecProperties" DependsOnTargets="__SetPropertiesFromGit"
39 + <Target Name="__SetNuspecProperties"
40 Condition=" Exists('$(MSBuildProjectName).nuspec') ">
41 <PropertyGroup>
42 <NuspecFile Condition=" '$(NuspecFile)'=='' ">$(MSBuildProjectName).nuspec</NuspecFile>
43 <PackageId Condition=" '$(PackageId)'=='' ">$(MSBuildProjectName)</PackageId>
44 <Title Condition=" '$(Title)'=='' ">$(Description)</Title>
45 <NuspecBasePath Condition=" '$(NuspecBasePath)'=='' ">$(OutputPath)</NuspecBasePath>
88 - <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Version=$(PackageVersion);Authors=$(Authors);Configuration=$(Configuration)</NuspecProperties>
46 + <NuspecProperties>$(NuspecProperties);Id=$(PackageId);Version=$(PackageVersion);MajorVersion=$(SomeVerInfoMajor);NextMajorVersion=$(SomeVerInfoNextMajor);Authors=$(Authors);Configuration=$(Configuration)</NuspecProperties>
47 <NuspecProperties>$(NuspecProperties);Copyright=$(Copyright);Description=$(Description);Title=$(Title)</NuspecProperties>
48 <NuspecProperties>$(NuspecProperties);RepositoryType=$(RepositoryType);RepositoryCommit=$(RepositoryCommit);RepositoryUrl=$(RepositoryUrl)</NuspecProperties>
49 <NuspecProperties>$(NuspecProperties);ProjectUrl=$(ProjectUrl);ProjectFolder=$(MSBuildProjectDirectory)</NuspecProperties>
50 </PropertyGroup>
93 -
94 - <Message Importance="$(GitInfoReportImportance)" Text="NuSpec info:
95 - NuspecFile: $(NuspecFile)
96 - NuspecBasePath: $(NuspecBasePath)
97 - NuspecProperties: $(NuspecProperties)
98 -" />
99 -
51 </Target>
52
53 <Target Name="PackNative" DependsOnTargets="__SetNuspecProperties"
54 Condition=" Exists('$(MSBuildProjectName).nuspec') ">
104 - <Error Text="There must be package reference to 'GitInfo'. Ensure the project was restored as well."
105 - Condition=" '$(GitInfoImported)'!='true' " />
55
56 <Exec Command='nuget pack $(NuspecFile) -OutputDirectory "$(PackageOutputPath.Trim(&quot;\&quot;))" -BasePath $(NuspecBasePath) -Properties "$(NuspecProperties)"'
57 WorkingDirectory="$(MSBuildProjectDirectory)" />
src/Directory.csproj.targets
-8
@@ -5,16 +5,8 @@
5 <CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
6 <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
7 <DefineConstants Condition=" '$(Configuration)'=='Debug' ">$(DefineConstants);DEBUG</DefineConstants>
8 -
9 - <WixVersionThisAssemblyFile>$(RootBuildFolder)ThisAssembly.WixVer.cs</WixVersionThisAssemblyFile>
8 </PropertyGroup>
9
12 - <ItemGroup Condition=" '$(IncludeThisAssembly)'=='true' ">
13 - <Compile Include="$(WixVersionThisAssemblyFile)" />
14 - </ItemGroup>
15 -
16 - <Target Name="__SetAssemblyInfoFromGit" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="GetAssemblyVersion" />
17 -
10 <PropertyGroup Condition=" '$(IsWixTestProject)'=='true' ">
11 <RollForward>Major</RollForward>
12 <IsPackable>false</IsPackable>
src/Directory.vcxproj.targets
-40
@@ -2,46 +2,6 @@
2 <!-- 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. -->
3
4 <Project>
5 - <PropertyGroup>
6 - <PrepareForBuildDependsOn>
7 - $(PrepareForBuildDependsOn);
8 - __SetVersionResource
9 - </PrepareForBuildDependsOn>
10 - </PropertyGroup>
11 -
12 - <Target Name="__SetVersionResource" DependsOnTargets="__SetPropertiesFromGit"
13 - Condition=" '$(ConfigurationType)'=='Application' or '$(ConfigurationType)'=='DynamicLibrary' ">
14 - <PropertyGroup>
15 - <_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP</_ResourceFileType>
16 - <_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL</_ResourceFileType>
17 - <Description Condition=" '$(Description)'=='' ">$(TargetName)</Description>
18 - <Title Condition=" '$(Title)'=='' ">$(Description)</Title>
19 - </PropertyGroup>
20 -
21 - <ItemGroup>
22 - <ResourceCompile Include="$(MSBuildThisFileDirectory)ver.rc">
23 - <PreprocessorDefinitions>
24 - %(PreprocessorDefinitions);
25 - GITVER_FILEVER=$(FileVersion.Replace('.', ','));
26 - GITVER_PRODUCTVER=$(AssemblyVersion.Replace('.', ','));
27 - GITVER_FILE_VERSION=$(FileVersion);
28 - GITVER_PRODUCT_VERSION=$(AssemblyVersion);
29 - GITVER_FILE_TYPE=$(_ResourceFileType);
30 - GITVER_CODEPAGE=0;
31 - GITVER_LCID=$([System.Convert]::ToInt32('%(Culture)', 16));
32 - GITVER_VERSION_BLOCK=$([System.Convert]::ToString($([MSBuild]::Multiply($([System.Convert]::ToUint64('%(Culture)', 16)), 65536)), 16).PadLeft(8, '0'));
33 - GITVER_COMPANY=$(Company);
34 - GITVER_COPYRIGHT=$(Copyright);
35 - GITVER_TITLE=$(Title);
36 - GITVER_PRODUCT=$(Product);
37 - GITVER_INFORMATIONAL_VERSION=$(InformationalVersion);
38 - GITVER_INTERNAL_NAME=$(TargetName);
39 - GITVER_FILE_NAME=$(TargetFileName);
40 - </PreprocessorDefinitions>
41 - </ResourceCompile>
42 - </ItemGroup>
43 - </Target>
44 -
5 <PropertyGroup>
6 <AfterLinkTargets>
7 $(AfterLinkTargets);
src/Directory.wixproj.targets
+3 -4
@@ -3,16 +3,15 @@
3
4 <Project>
5 <Target Name="_SetWixVersion"
6 - DependsOnTargets="__SetPropertiesFromGit"
6 AfterTargets="_CreateProjectDefineConstants">
7 <PropertyGroup>
9 - <PrereleaseSuffix Condition=" '$(GitSemVerDashLabel)'!='' ">-prerelease</PrereleaseSuffix>
8 + <PrereleaseSuffix Condition=" '$(SomeVerInfoDashLabel)'!='' ">-prerelease</PrereleaseSuffix>
9
10 <DefineConstants>
11 $(DefineConstants);
12 SetupVersion=$(PackageVersion);
14 - SetupMajorMinorVersion=$(GitBaseVersionMajor).$(GitBaseVersionMinor);
15 - SetupDashedMajorMinorVersion=$(GitBaseVersionMajor)-$(GitBaseVersionMinor);
13 + SetupMajorMinorVersion=$(SomeVerInfoMajor).$(SomeVerInfoMinor);
14 + SetupDashedMajorMinorVersion=$(SomeVerInfoMajor)-$(SomeVerInfoMinor);
15 SetupDashedPrerelease=$(PrereleaseSuffix)
16 </DefineConstants>
17 </PropertyGroup>
src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.nuspec
+1 -1
@@ -16,7 +16,7 @@
16 <group targetFramework=".NETFramework4.6.2" />
17 <group targetFramework=".NETStandard2.0" />
18 <group targetFramework="Native">
19 - <dependency id="WixToolset.DUtil" version="[$version$,6)" />
19 + <dependency id="WixToolset.DUtil" version="[$version$,$nextmajorversion$)" />
20 </group>
21 </dependencies>
22 </metadata>
src/api/burn/bextutil/bextutil.nuspec
+1 -1
@@ -13,7 +13,7 @@
13 <projectUrl>$projectUrl$</projectUrl>
14 <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
15 <dependencies>
16 - <dependency id="WixToolset.DUtil" version="[$version$,6)" />
16 + <dependency id="WixToolset.DUtil" version="[$version$,$nextmajorversion$)" />
17 </dependencies>
18 </metadata>
19
src/build_init.cmd
+1 -1
@@ -5,7 +5,7 @@ md ..\build\artifacts
5 md ..\build\logs\crashdumps
6 md ..\build\logs\TestResults
7
8 -msbuild -Restore internal\SetBuildNumber\SetBuildNumber.proj -nologo
8 +msbuild -Restore internal\SetBuildNumber\SomeVerInit.verproj -nologo
9
10 @popd
11 @endlocal
src/burn/engine/engine.vcxproj
+5 -5
@@ -158,12 +158,12 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
158 </CustomBuildStep>
159 </ItemDefinitionGroup>
160
161 - <Target Name="SetWixVersion" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="ClCompile">
161 + <Target Name="SetWixVersion" BeforeTargets="ClCompile">
162 <PropertyGroup>
163 - <rmj>$(GitBaseVersionMajor)</rmj>
164 - <rmm>$(GitBaseVersionMinor)</rmm>
165 - <rup>$(GitBaseVersionPatch)</rup>
166 - <rpr>$(GitCommits)</rpr>
163 + <rmj>$(SomeVerInfoMajor)</rmj>
164 + <rmm>$(SomeVerInfoMinor)</rmm>
165 + <rup>$(SomeVerInfoPatch)</rup>
166 + <rpr>$(SomeVerInfoHeight)</rpr>
167 <szVerMajorMinorBuild>$(rmj).$(rmm).$(rup).$(rpr)</szVerMajorMinorBuild>
168 <szInformationalVersion>$(InformationalVersion)</szInformationalVersion>
169 </PropertyGroup>
src/ext/Bal/wixstdfn/wixstdfn.nuspec
+2 -2
@@ -15,8 +15,8 @@
15 <readme>README.md</readme>
16 <dependencies>
17 <group targetFramework="Native">
18 - <dependency id="WixToolset.BootstrapperApplicationApi" version="[$version$,6)" />
19 - <dependency id="WixToolset.DUtil" version="[$version$,6)" />
18 + <dependency id="WixToolset.BootstrapperApplicationApi" version="[$version$,$nextmajorversion$)" />
19 + <dependency id="WixToolset.DUtil" version="[$version$,$nextmajorversion$)" />
20 </group>
21 </dependencies>
22 </metadata>
src/internal/SetBuildNumber/Directory.Packages.props.pp
-1
@@ -77,7 +77,6 @@
77 <!-- Keep the following versions in sync with internal\WixInternal.TestSupport.Native\packages.config -->
78 <ItemGroup>
79 <PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
80 - <PackageVersion Include="GitInfo" Version="2.3.0" />
80
81 <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
82 <PackageVersion Include="xunit" Version="2.5.1" />
src/internal/SetBuildNumber/SetBuildNumber.proj deleted
-115
@@ -1,115 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- 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. -->
3 -
4 -<Project Sdk="Microsoft.Build.NoTargets/3.5.6">
5 - <PropertyGroup>
6 - <TargetFramework>net6.0</TargetFramework>
7 - <!-- Disable central package version management since this project will write the central package version management file -->
8 - <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
9 -
10 - <!-- Explicitly set the restore sources because this project may run before the build\artifacts folder has been created -->
11 - <RestoreSources>https://api.nuget.org/v3/index.json</RestoreSources>
12 - <RestoreIgnoreFailedSources>true</RestoreIgnoreFailedSources>
13 -
14 - <Language>C#</Language>
15 - <DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
16 - <GitThisAssembly>true</GitThisAssembly>
17 - </PropertyGroup>
18 -
19 - <PropertyGroup>
20 - <SetBuildNumbersDependsOn>
21 - __SetPropertiesFromGit;
22 - GitThisAssembly;
23 - SetGlobalJson;
24 - SetDirectoryPackagesProps;
25 - SetOverallWixVersions
26 - </SetBuildNumbersDependsOn>
27 -
28 - <GlobalJsonPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\global.json))</GlobalJsonPath>
29 - <CentralPackageVersionsPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\Directory.Packages.props))</CentralPackageVersionsPath>
30 - <OverallWixVersionsPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\wixver.props))</OverallWixVersionsPath>
31 - <GitInfoThisAssemblyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\ThisAssembly.WixVer.cs))</GitInfoThisAssemblyFile>
32 - </PropertyGroup>
33 -
34 - <Target Name="SetGlobalJson"
35 - Inputs="global.json.pp"
36 - Outputs="$(GlobalJsonPath)">
37 - <PropertyGroup>
38 - <!-- https://github.com/NuGet/Home/issues/11784
39 - <GlobaJsonTextHeader>/* DO NOT MODIFY! Auto-generated from internal\SetBuildNumber\global.json.pp */</GlobaJsonTextHeader>
40 - -->
41 - <GlobalJsonText>$([System.IO.File]::ReadAllText(global.json.pp))</GlobalJsonText>
42 - <GlobalJsonText>$(GlobalJsonText.Replace('{apiversion}', $(ApiVersion)))</GlobalJsonText>
43 - <GlobalJsonText>$(GlobalJsonText.Replace('{fileversion}', $(FileVersion)))</GlobalJsonText>
44 - <GlobalJsonText>$(GlobalJsonText.Replace('{fullversion}', $(InformationalVersion)))</GlobalJsonText>
45 - <GlobalJsonText>$(GlobalJsonText.Replace('{informationalversion}', $(InformationalVersion)))</GlobalJsonText>
46 - <GlobalJsonText>$(GlobalJsonText.Replace('{height}', $(GitCommits)))</GlobalJsonText>
47 - <GlobalJsonText>$(GlobalJsonText.Replace('{packageversion}', $(PackageVersion)))</GlobalJsonText>
48 - <GlobalJsonText>$(GlobalJsonText.Replace('{version}', $(Version)))</GlobalJsonText>
49 - </PropertyGroup>
50 -
51 - <WriteLinesToFile File="$(GlobalJsonPath)"
52 - Lines="$(GlobaJsonTextHeader);$(GlobalJsonText)"
53 - Overwrite="true"
54 - WriteOnlyWhenDifferent="true" />
55 -
56 - <Message Importance="high" Text="$(MSBuildProjectName) -&gt; $(GlobalJsonPath)" />
57 - </Target>
58 -
59 -
60 - <Target Name="SetDirectoryPackagesProps"
61 - Inputs="Directory.Packages.props.pp"
62 - Outputs="$(CentralPackageVersionsPath)">
63 - <PropertyGroup>
64 - <CentralPackageVersionsTextHeader>&lt;!-- DO NOT MODIFY! Auto-generated from internal\SetBuildNumber\Directory.Packages.props.pp --&gt;</CentralPackageVersionsTextHeader>
65 - <CentralPackageVersionsText>$([System.IO.File]::ReadAllText(Directory.Packages.props.pp))</CentralPackageVersionsText>
66 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{apiversion}', $(ApiVersion)))</CentralPackageVersionsText>
67 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{fileversion}', $(FileVersion)))</CentralPackageVersionsText>
68 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{fullversion}', $(InformationalVersion)))</CentralPackageVersionsText>
69 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{informationalversion}', $(InformationalVersion)))</CentralPackageVersionsText>
70 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{height}', $(GitCommits)))</CentralPackageVersionsText>
71 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{packageversion}', $(PackageVersion)))</CentralPackageVersionsText>
72 - <CentralPackageVersionsText>$(CentralPackageVersionsText.Replace('{version}', $(Version)))</CentralPackageVersionsText>
73 - </PropertyGroup>
74 -
75 - <WriteLinesToFile File="$(CentralPackageVersionsPath)"
76 - Lines="$(CentralPackageVersionsTextHeader);$(CentralPackageVersionsText)"
77 - Overwrite="true"
78 - WriteOnlyWhenDifferent="true" />
79 -
80 - <Message Importance="high" Text="$(MSBuildProjectName) -&gt; $(CentralPackageVersionsPath)" />
81 - </Target>
82 -
83 -
84 - <Target Name="SetOverallWixVersions"
85 - Inputs="wixver.props.pp"
86 - Outputs="$(OverallWixVersionsPath)">
87 - <PropertyGroup>
88 - <OverallWixVersionsTextHeader>&lt;!-- DO NOT MODIFY! Auto-generated from internal\SetBuildNumber\wixver.props.pp --&gt;</OverallWixVersionsTextHeader>
89 - <OverallWixVersionsText>$([System.IO.File]::ReadAllText(wixver.props.pp))</OverallWixVersionsText>
90 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionMajor}', $(GitBaseVersionMajor)))</OverallWixVersionsText>
91 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionMinor}', $(GitBaseVersionMinor)))</OverallWixVersionsText>
92 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitBaseVersionPatch}', $(GitBaseVersionPatch)))</OverallWixVersionsText>
93 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitCommits}', $(GitCommits)))</OverallWixVersionsText>
94 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitSemVerDashLabel}', $(GitSemVerDashLabel)))</OverallWixVersionsText>
95 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitSha}', $(GitSha)))</OverallWixVersionsText>
96 - <OverallWixVersionsText>$(OverallWixVersionsText.Replace('{GitRepositoryUrl}', $(GitRepositoryUrl.Replace('.git',''))))</OverallWixVersionsText>
97 - </PropertyGroup>
98 -
99 - <WriteLinesToFile File="$(OverallWixVersionsPath)"
100 - Lines="$(OverallWixVersionsTextHeader);$(OverallWixVersionsText)"
101 - Overwrite="true"
102 - WriteOnlyWhenDifferent="true" />
103 -
104 - <Message Importance="high" Text="$(MSBuildProjectName) -&gt; $(OverallWixVersionsPath)" />
105 - </Target>
106 -
107 -
108 - <Target Name="SetBuildNumbers"
109 - DependsOnTargets="$(SetBuildNumbersDependsOn)"
110 - BeforeTargets="AfterBuild" />
111 -
112 - <ItemGroup>
113 - <PackageReference Include="GitInfo" Version="2.3.0" />
114 - </ItemGroup>
115 -</Project>
src/internal/SetBuildNumber/SomeVerInfo.cs.pp new
+29
@@ -0,0 +1,29 @@
1 +// DO NOT MODIFY! Auto-generated from SomeVerInfo.cs.pp
2 +
3 +/// <summary>Provides access to the current assembly information.</summary>
4 +partial class SomeVerInfo
5 +{
6 + /// <summary>Full information version: {informationalversion}</summary>
7 + public const string InformationalVersion = @"{informationalversion}";
8 +
9 + /// <summary>File version: {fileversion}</summary>
10 + public const string FileVersion = @"{fileversion}";
11 +
12 + /// <summary>Commits on top of base version: 2</summary>
13 + public const string Commits = @"{height}";
14 +
15 + /// <summary>Major version: {major}</summary>
16 + public const string Major = @"{major}";
17 +
18 + /// <summary>Minor version: {minor}</summary>
19 + public const string Minor = @"{minor}";
20 +
21 + /// <summary>Patch version: {patch}</summary>
22 + public const string Patch = @"{patch}";
23 +
24 + /// <summary>Label: {dashlabel}</summary>
25 + public const string Label = @"{dashlabel}";
26 +
27 + /// <summary>ShortSha: {shortsha}</summary>
28 + public const string ShortSha = @"{shortsha}";
29 +}
src/internal/SetBuildNumber/SomeVerInfo.props.pp new
+25
@@ -0,0 +1,25 @@
1 +<Project>
2 + <PropertyGroup>
3 + <SomeVerInfoImported>true</SomeVerInfoImported>
4 + <SomeVerInfoFromCache>true</SomeVerInfoFromCache>
5 + <SomeVerInfoNextMajor>{nextmajor}</SomeVerInfoNextMajor>
6 + <SomeVerInfoNextMinor>{nextminor}</SomeVerInfoNextMinor>
7 + <SomeVerInfoMajor>{major}</SomeVerInfoMajor>
8 + <SomeVerInfoMinor>{minor}</SomeVerInfoMinor>
9 + <SomeVerInfoPatch>{patch}</SomeVerInfoPatch>
10 + <SomeVerInfoHeight>{height}</SomeVerInfoHeight>
11 + <SomeVerInfoFullHeight>{fullheight}</SomeVerInfoFullHeight>
12 + <SomeVerInfoLabel>{label}</SomeVerInfoLabel>
13 + <SomeVerInfoDashLabel>{dashlabel}</SomeVerInfoDashLabel>
14 + <SomeVerInfoSha>{sha}</SomeVerInfoSha>
15 + <SomeVerInfoShortSha>{shortsha}</SomeVerInfoShortSha>
16 + <SomeVerInfoVersion>{informationalversion}</SomeVerInfoVersion>
17 + </PropertyGroup>
18 +
19 + <PropertyGroup>
20 + <AssemblyVersion>{major}.0.0.0</AssemblyVersion>
21 + <FileVersion>{major}.{minor}.{patch}.{fullheight}</FileVersion>
22 + <InformationalVersion>{informationalversion}</InformationalVersion>
23 + <PackageVersion>{major}.{minor}.{patch}{dashlabel}</PackageVersion>
24 + </PropertyGroup>
25 +</Project>
src/internal/SetBuildNumber/SomeVerInfo.rc.pp new
+52
@@ -0,0 +1,52 @@
1 +#pragma once
2 +// ------------------------------------------------------------------------------
3 +// <auto-generated>
4 +// This code was generated from SomeVerInfo.rc.
5 +// </auto-generated>
6 +// ------------------------------------------------------------------------------
7 +
8 +#if defined(_UNICODE)
9 +#define CREATE_VERSION_STRING(x) L ## #x
10 +#else
11 +#define CREATE_VERSION_STRING(x) #x
12 +#endif
13 +
14 +#define CVS(x) CREATE_VERSION_STRING(x)
15 +
16 +#ifdef RC_INVOKED
17 +
18 +#include <winres.h>
19 +
20 +VS_VERSION_INFO VERSIONINFO
21 + FILEVERSION {major},{minor},{patch},{fullheight}
22 + PRODUCTVERSION {major},{minor},0,0
23 + FILEFLAGSMASK 0x3FL
24 +#ifdef _DEBUG
25 + FILEFLAGS 0x1L
26 +#else
27 + FILEFLAGS 0x0L
28 +#endif
29 + FILEOS 0x4L
30 + FILETYPE SOMEVER_FILE_TYPE
31 + FILESUBTYPE 0x0L
32 +BEGIN
33 + BLOCK "StringFileInfo"
34 + BEGIN
35 + BLOCK CVS(SOMEVER_VERSION_BLOCK)
36 + BEGIN
37 + VALUE "CompanyName", CVS(SOMEVER_COMPANY)
38 + VALUE "FileDescription", CVS(SOMEVER_TITLE)
39 + VALUE "FileVersion", CVS({fileversion})
40 + VALUE "InternalName", CVS(SOMEVER_INTERNAL_NAME)
41 + VALUE "OriginalFilename", CVS(SOMEVER_FILE_NAME)
42 + VALUE "ProductName", CVS(SOMEVER_PRODUCT)
43 + VALUE "ProductVersion", CVS({informationalversion})
44 + VALUE "LegalCopyright", CVS(SOMEVER_COPYRIGHT)
45 + END
46 + END
47 + BLOCK "VarFileInfo"
48 + BEGIN
49 + VALUE "Translation", SOMEVER_LCID, SOMEVER_CODEPAGE
50 + END
51 +END
52 +#endif
src/internal/SetBuildNumber/SomeVerInfo.targets new
+49
@@ -0,0 +1,49 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project>
5 + <Import Project="SomeVerInit.props" Condition=" '$(SomeVerInitImported)'!='true'" />
6 +
7 + <ItemGroup Condition=" '$(IncludeSomeVerInfo)' == 'true' ">
8 + <Compile Include="$(SomeVerInfoCsFile)" />
9 + </ItemGroup>
10 +
11 + <PropertyGroup Condition=" '$(Language)'=='C++' ">
12 + <PrepareForBuildDependsOn>
13 + $(PrepareForBuildDependsOn);
14 + __SetVersionResource
15 + </PrepareForBuildDependsOn>
16 + </PropertyGroup>
17 +
18 + <Target Name="__SetVersionResource"
19 + Inputs="$(SomeVerInfoRcFile)"
20 + Outputs="$(TargetPath)"
21 + Condition=" '$(ConfigurationType)'=='Application' or '$(ConfigurationType)'=='DynamicLibrary' ">
22 + <PropertyGroup>
23 + <_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP</_ResourceFileType>
24 + <_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL</_ResourceFileType>
25 + <Lcid Condition=" '$(Lcid)'=='' ">0x0409</Lcid>
26 + <Description Condition=" '$(Description)'=='' ">$(TargetName)</Description>
27 + <Title Condition=" '$(Title)'=='' ">$(Description)</Title>
28 + </PropertyGroup>
29 +
30 + <ItemGroup>
31 + <ResourceCompile Include="$(SomeVerInfoRcFile)">
32 + <PreprocessorDefinitions>
33 + %(PreprocessorDefinitions);
34 + SOMEVER_FILE_TYPE=$(_ResourceFileType);
35 + SOMEVER_CODEPAGE=0;
36 + SOMEVER_LCID=$([System.Convert]::ToInt32('$(Lcid)', 16));
37 + SOMEVER_VERSION_BLOCK=$([System.Convert]::ToString($([MSBuild]::Multiply($([System.Convert]::ToUint64('$(Lcid)', 16)), 65536)), 16).PadLeft(8, '0'));
38 + SOMEVER_COMPANY=$(Company);
39 + SOMEVER_COPYRIGHT=$(Copyright);
40 + SOMEVER_TITLE=$(Title);
41 + SOMEVER_PRODUCT=$(Product);
42 + SOMEVER_INTERNAL_NAME=$(TargetName);
43 + SOMEVER_FILE_NAME=$(TargetFileName);
44 + </PreprocessorDefinitions>
45 + </ResourceCompile>
46 + </ItemGroup>
47 + </Target>
48 +
49 +</Project>
src/internal/SetBuildNumber/SomeVerInit.props new
+13
@@ -0,0 +1,13 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +<Project>
4 + <PropertyGroup>
5 + <GlobalJsonFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\global.json))</GlobalJsonFile>
6 + <CentralPackageVersionsPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\Directory.Packages.props))</CentralPackageVersionsPath>
7 + <SomeVerInfoCsFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\SomeVerInfo.cs))</SomeVerInfoCsFile>
8 + <SomeVerInfoRcFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\SomeVerInfo.rc))</SomeVerInfoRcFile>
9 + <SomeVerInfoPropsFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\build\SomeVerInfo.props))</SomeVerInfoPropsFile>
10 +
11 + <SomeVerInitImported>true</SomeVerInitImported>
12 + </PropertyGroup>
13 +</Project>
src/internal/SetBuildNumber/SomeVerInit.verproj new
+33
@@ -0,0 +1,33 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project Sdk="SomeVer/0.1.1">
5 + <PropertyGroup>
6 + <TargetFramework>netstandard2.0</TargetFramework>
7 +
8 + <!-- Disable central package version management since this project will write the central package version management file -->
9 + <ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
10 +
11 + <!-- Explicitly set the restore sources because this project may run before the build\artifacts folder has been created -->
12 + <RestoreSources>https://api.nuget.org/v3/index.json</RestoreSources>
13 + <RestoreIgnoreFailedSources>true</RestoreIgnoreFailedSources>
14 +
15 + <!-- SomeVer configuration -->
16 + <SomeVerAutoIncrement>major</SomeVerAutoIncrement>
17 + <SomeVerDefaultPreReleaseIdentifiers>build</SomeVerDefaultPreReleaseIdentifiers>
18 + <SomeVerIncludeDefaultPreReleaseIdentifiersWithPrereleases>true</SomeVerIncludeDefaultPreReleaseIdentifiersWithPrereleases>
19 + <SomeVerTagPrefix>v</SomeVerTagPrefix>
20 +
21 + <!-- Pretend that the SomeVer information was imported because we'll actually be creating it here -->
22 + <SomeVerInfoImported>true</SomeVerInfoImported>
23 + </PropertyGroup>
24 +
25 + <ItemGroup>
26 + <VersionTemplate Include="global.json.pp" OutputPath="$(GlobalJsonFile)" />
27 + <VersionTemplate Include="Directory.Packages.props.pp" OutputPath="$(CentralPackageVersionsPath)" />
28 + <VersionTemplate Include="SomeVerInfo.cs.pp" OutputPath="$(SomeVerInfoCsFile)" />
29 + <VersionTemplate Include="SomeVerInfo.rc.pp" OutputPath="$(SomeVerInfoRcFile)" />
30 + <VersionTemplate Include="SomeVerInfo.props.pp" OutputPath="$(SomeVerInfoPropsFile)" />
31 + </ItemGroup>
32 +
33 +</Project>
src/internal/SetBuildNumber/wixver.props.pp deleted
-13
@@ -1,13 +0,0 @@
1 -<Project>
2 - <PropertyGroup>
3 - <GitInfoFromCache>true</GitInfoFromCache>
4 - <GitInfoImported>true</GitInfoImported>
5 - <GitBaseVersionMajor>{GitBaseVersionMajor}</GitBaseVersionMajor>
6 - <GitBaseVersionMinor>{GitBaseVersionMinor}</GitBaseVersionMinor>
7 - <GitBaseVersionPatch>{GitBaseVersionPatch}</GitBaseVersionPatch>
8 - <GitCommits>{GitCommits}</GitCommits>
9 - <GitSemVerDashLabel>{GitSemVerDashLabel}</GitSemVerDashLabel>
10 - <GitSha>{GitSha}</GitSha>
11 - <GitRepositoryUrl>{GitRepositoryUrl}</GitRepositoryUrl>
12 - </PropertyGroup>
13 -</Project>
src/internal/WixBuildFinalize/WixBuildFinalize.proj
+1 -1
@@ -6,7 +6,7 @@
6 <TargetFramework>net472</TargetFramework>
7 </PropertyGroup>
8
9 - <Target Name="ZipPdbs" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="AfterBuild">
9 + <Target Name="ZipPdbs" BeforeTargets="AfterBuild">
10 <ZipDirectory
11 SourceDirectory="$(PdbsFolder)"
12 DestinationFile="$(ArtifactsFolder)\wix-pdbs.$(Version).zip"
src/libs/wcautil/WixToolset.WcaUtil/wcautil.nuspec
+1 -1
@@ -13,7 +13,7 @@
13 <projectUrl>$projectUrl$</projectUrl>
14 <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
15 <dependencies>
16 - <dependency id="WixToolset.DUtil" version="[$version$,6)" />
16 + <dependency id="WixToolset.DUtil" version="[$version$,$nextmajorversion$)" />
17 </dependencies>
18 </metadata>
19
src/version.txt deleted
-1
@@ -1 +0,0 @@
1 -6.0.0-dev.1
src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs
+1 -1
@@ -75,7 +75,7 @@ namespace WixToolset.Core.Burn.Bundles
75 writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace);
76
77 // Write attributes to support harvesting bundles.
78 - writer.WriteAttributeString("EngineVersion", $"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}");
78 + writer.WriteAttributeString("EngineVersion", $"{SomeVerInfo.Major}.{SomeVerInfo.Minor}.{SomeVerInfo.Patch}.{SomeVerInfo.Commits}");
79 writer.WriteAttributeString("ProtocolVersion", BurnCommon.BURN_PROTOCOL_VERSION.ToString());
80 writer.WriteAttributeString("Win64", this.BundleSymbol.Platform == Platform.X86 ? "no" : "yes");
81
src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+1 -1
@@ -9,7 +9,7 @@
9 <DebugType>embedded</DebugType>
10 <PublishRepositoryUrl>true</PublishRepositoryUrl>
11 <CreateDocumentationFile>true</CreateDocumentationFile>
12 - <IncludeThisAssembly>true</IncludeThisAssembly>
12 + <IncludeSomeVerInfo>true</IncludeSomeVerInfo>
13 </PropertyGroup>
14
15 <ItemGroup>
src/wix/WixToolset.Core/CommandLine/VersionCommand.cs
+5 -5
@@ -19,11 +19,11 @@ namespace WixToolset.Core.CommandLine
19 public override Task<int> ExecuteAsync(CancellationToken cancellationToken)
20 {
21 // $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)+$(Commit)
22 - Console.WriteLine("{0}.{1}.{2}{3}+{4}", ThisAssembly.Git.BaseVersion.Major
23 - , ThisAssembly.Git.BaseVersion.Minor
24 - , ThisAssembly.Git.BaseVersion.Patch
25 - , ThisAssembly.Git.SemVer.DashLabel
26 - , ThisAssembly.Git.Commit);
22 + Console.WriteLine("{0}.{1}.{2}{3}+{4}", SomeVerInfo.Major
23 + , SomeVerInfo.Minor
24 + , SomeVerInfo.Patch
25 + , SomeVerInfo.Label
26 + , SomeVerInfo.ShortSha);
27 return Task.FromResult(0);
28 }
29
src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
+3 -3
@@ -87,7 +87,7 @@ namespace WixToolset.Core.ExtensibilityServices
87
88 var result = this.EvaluateFunction(context, prefix, functionName, args);
89
90 - // If the function didn't evaluate, try to evaluate the original value as a variable to support
90 + // If the function didn't evaluate, try to evaluate the original value as a variable to support
91 // the use of open and closed parens inside variable names. Example: $(env.ProgramFiles(x86)) should resolve.
92 if (result == null)
93 {
@@ -262,10 +262,10 @@ namespace WixToolset.Core.ExtensibilityServices
262 }
263
264 case "WIXMAJORVERSION":
265 - return ThisAssembly.Git.BaseVersion.Major;
265 + return SomeVerInfo.Major;
266
267 case "WIXVERSION":
268 - return $"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}";
268 + return $"{SomeVerInfo.Major}.{SomeVerInfo.Minor}.{SomeVerInfo.Patch}.{SomeVerInfo.Commits}";
269
270 default:
271 return null;
src/wix/WixToolset.Core/WixToolset.Core.csproj
+1 -1
@@ -9,7 +9,7 @@
9 <DebugType>embedded</DebugType>
10 <PublishRepositoryUrl>true</PublishRepositoryUrl>
11 <CreateDocumentationFile>true</CreateDocumentationFile>
12 - <IncludeThisAssembly>true</IncludeThisAssembly>
12 + <IncludeSomeVerInfo>true</IncludeSomeVerInfo>
13 </PropertyGroup>
14
15 <ItemGroup>
src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj
+5 -5
@@ -37,30 +37,30 @@
37 XmlInputPath="$(PublishDir)tools\wix.props"
38 Namespaces="$(Namespaces)"
39 Query="//msb:WixToolsetMajorVersion"
40 - Value="$(WixMajorVersion)" />
40 + Value="$(SomeVerInfoMajor)" />
41
42 <XmlPoke
43 XmlInputPath="$(PublishDir)tools\wix.props"
44 Namespaces="$(Namespaces)"
45 Query="//msb:WixToolsetMinorVersion"
46 - Value="$(WixMinorVersion)" />
46 + Value="$(SomeVerInfoMinor)" />
47
48 <XmlPoke
49 XmlInputPath="$(PublishDir)tools\wix.props"
50 Namespaces="$(Namespaces)"
51 Query="//msb:WixToolsetPatchVersion"
52 - Value="$(WixPatchVersion)" />
52 + Value="$(SomeVerInfoPatch)" />
53
54 <XmlPoke
55 XmlInputPath="$(PublishDir)tools\wix.props"
56 Namespaces="$(Namespaces)"
57 Query="//msb:WixToolsetMajorMinorVersion"
58 - Value="$(MajorMinorVersion)" />
58 + Value="$(SomeVerInfoMajor).$(SomeVerInfoMinor)" />
59
60 <XmlPoke
61 XmlInputPath="$(PublishDir)tools\wix.props"
62 Namespaces="$(Namespaces)"
63 Query="//msb:WixToolsetVersion"
64 - Value="$(Version)" />
64 + Value="$(SomeVerInfoMajor).$(SomeVerInfoMinor).$(SomeVerInfoPatch)" />
65 </Target>
66 </Project>