Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit da68118

Browse files
committed
Update all VSIX versions
1 parent d44cee5 commit da68118

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

scripts/modules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ New-Module -ScriptBlock {
183183

184184
$manifest = @{
185185
NewestExtension = @{
186-
Version = [string](Read-CurrentVersionVsix)
186+
Version = [string](Read-CurrentVersionVsix 'src\GitHub.VisualStudio.Vsix')
187187
Commit = [string](Get-HeadSha)
188188
}
189189
}

scripts/modules/Versioning.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ New-Module -ScriptBlock {
3939
}
4040

4141
function Write-Version([System.Version]$version) {
42-
Write-VersionVsixManifest $version
42+
Write-VersionVsixManifest $version 'src\GitHub.VisualStudio.Vsix'
43+
Write-VersionVsixManifest $version 'src\GitHub.VisualStudio.16'
4344
Write-VersionSolutionInfo $version
4445
Write-VersionAppVeyor $version
4546
Write-DirectoryBuildProps $version

scripts/modules/Vsix.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Set-StrictMode -Version Latest
22

33
New-Module -ScriptBlock {
4-
$gitHubDirectory = Join-Path $rootDirectory src\GitHub.VisualStudio.Vsix
54

6-
function Get-VsixManifestPath {
5+
function Get-VsixManifestPath([string]$projectPath) {
6+
$gitHubDirectory = Join-Path $rootDirectory $projectPath
77
Join-Path $gitHubDirectory source.extension.vsixmanifest
88
}
99

10-
function Get-VsixManifestXml {
11-
$xmlLines = Get-Content (Get-VsixManifestPath)
10+
function Get-VsixManifestXml([string]$projectPath) {
11+
$xmlLines = Get-Content (Get-VsixManifestPath($projectPath))
1212
# If we don't explicitly join the lines with CRLF, comments in the XML will
1313
# end up with LF line-endings, which will make Git spew a warning when we
1414
# try to commit the version bump.
@@ -17,18 +17,18 @@ New-Module -ScriptBlock {
1717
[xml] $xmlText
1818
}
1919

20-
function Read-CurrentVersionVsix {
21-
[System.Version] (Get-VsixManifestXml).PackageManifest.Metadata.Identity.Version
20+
function Read-CurrentVersionVsix([string]$projectPath) {
21+
[System.Version] (Get-VsixManifestXml($projectPath)).PackageManifest.Metadata.Identity.Version
2222
}
2323

24-
function Write-VersionVsixManifest([System.Version]$version) {
24+
function Write-VersionVsixManifest([System.Version]$version,[string]$projectPath) {
2525

26-
$document = Get-VsixManifestXml
26+
$document = Get-VsixManifestXml($projectPath)
2727

2828
$numberOfReplacements = 0
2929
$document.PackageManifest.Metadata.Identity.Version = $version.ToString()
3030

31-
$document.Save((Get-VsixManifestPath))
31+
$document.Save((Get-VsixManifestPath($projectPath)))
3232
}
3333

3434
Export-ModuleMember -Function Read-CurrentVersionVsix,Write-VersionVsixManifest

0 commit comments

Comments
 (0)