11Set-StrictMode - Version Latest
22
33New-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