This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree 3 files changed +26
-0
lines changed
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 }
53
53
. $scriptsDirectory \Modules\Vsix.ps1 | out-null
54
54
. $scriptsDirectory \Modules\SolutionInfo.ps1 | out-null
55
55
. $scriptsDirectory \Modules\AppVeyor.ps1 | out-null
56
+ . $scriptsDirectory \Modules\DirectoryBuildProps.ps1 | out-null
56
57
57
58
if ($NewVersion -eq $null ) {
58
59
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 {
42
42
Write-VersionVsixManifest $version
43
43
Write-VersionSolutionInfo $version
44
44
Write-VersionAppVeyor $version
45
+ Write-DirectoryBuildProps $version
45
46
Push-Location $rootDirectory
46
47
New-Item - Type Directory - ErrorAction SilentlyContinue build | out-null
47
48
Set-Content build\version $version
You can’t perform that action at this time.
0 commit comments