File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -174,3 +174,6 @@ UpgradeLog*.txt
174174
175175# WiX toolset files
176176C_SecondaryClickComponents.wxs
177+
178+ # Build script files
179+ GitVersion.cs
Original file line number Diff line number Diff line change @@ -13,10 +13,22 @@ $scriptRoot = $PSScriptRoot
1313$repoRoot = [System.IO.Path ]::GetFullPath((Join-Path $scriptRoot " .." ))
1414$version = git describe -- always -- tags -- exclude latest
1515$globalPackages = (dotnet nuget locals global- packages -- list) -split " :\s*" , 2 | Select-Object - Last 1
16-
16+ $tag = git describe -- always -- tags " --abbrev=0" -- exclude latest
17+ $revision = git describe -- always -- tags -- exclude latest
18+ $text = @"
19+ // This file is generated by update-version.ps1
20+
21+ using System.Reflection;
22+
23+ [assembly: AssemblyVersion("$tag ")]
24+ [assembly: AssemblyInformationalVersion("$revision ")]
25+ "@
1726$sevenZip = Join-Path $globalPackages " micasetup.tools\2.5.0\build\bin\7z.exe"
1827$makemicaPath = Join-Path $globalPackages " micasetup.tools\2.5.0\build\makemica.exe"
1928
29+ # Update Git version info in source code
30+ $text | Out-File $PSScriptRoot \..\src\SecondaryClick\GitVersion.cs - Encoding utf8
31+
2032# Installer build settings
2133$appProject = Join-Path $repoRoot " src\SecondaryClick\SecondaryClick.csproj"
2234$installerProject = Join-Path $repoRoot " src\SecondaryClick.Installer\SecondaryClick.Installer.wixproj"
Original file line number Diff line number Diff line change 77 <ImplicitUsings >enable</ImplicitUsings >
88 <UseWPF >true</UseWPF >
99 <UseWindowsForms >false</UseWindowsForms >
10- <AssemblyVersion >1.0.1.0</AssemblyVersion >
11- <FileVersion >1.0.1.0</FileVersion >
12- <Version >$(VersionPrefix)1.0.1.0</Version >
1310 <ApplicationIcon >logo.ico</ApplicationIcon >
1411 <ApplicationManifest >app.manifest</ApplicationManifest >
1512 <DebugType >embedded</DebugType >
You can’t perform that action at this time.
0 commit comments