This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ if ($Trace) { Set-PSDebug -Trace 1 }
5353. $scriptsDirectory \Modules\Vsix.ps1 | out-null
5454. $scriptsDirectory \Modules\SolutionInfo.ps1 | out-null
5555. $scriptsDirectory \Modules\AppVeyor.ps1 | out-null
56+ . $scriptsDirectory \Modules\DirectoryBuildProps.ps1 | out-null
5657
5758if ($NewVersion -eq $null ) {
5859 if (! $BumpMajor -and ! $BumpMinor -and ! $BumpPatch -and ! $BumpBuild ){
Original file line number Diff line number Diff line change 1+ Set-StrictMode - Version Latest
2+
3+ New-Module - ScriptBlock {
4+ function Get-DirectoryBuildPropsPath {
5+ Join-Path $rootDirectory Directory.Build.Props
6+ }
7+
8+ function Get-DirectoryBuildProps {
9+ $xmlLines = Get-Content (Get-DirectoryBuildPropsPath ) - encoding UTF8
10+ [xml ] $xmlLines
11+ }
12+
13+ function Write-DirectoryBuildProps ([System.Version ]$version ) {
14+
15+ $document = Get-DirectoryBuildProps
16+
17+ $numberOfReplacements = 0
18+ $document.Project.PropertyGroup.Version = $version.ToString ()
19+
20+ $document.Save ((Get-DirectoryBuildPropsPath ))
21+ }
22+
23+ Export-ModuleMember - Function Write-DirectoryBuildProps
24+ }
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ New-Module -ScriptBlock {
4242 Write-VersionVsixManifest $version
4343 Write-VersionSolutionInfo $version
4444 Write-VersionAppVeyor $version
45+ Write-DirectoryBuildProps $version
4546 Push-Location $rootDirectory
4647 New-Item - Type Directory - ErrorAction SilentlyContinue build | out-null
4748 Set-Content build\version $version
You can’t perform that action at this time.
0 commit comments