File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 32
32
[string ] $ReleaseNotes
33
33
)
34
34
35
+ $cleanVersion = $Version -replace ' -.*$' , ' '
35
36
Write-Output " Running $ ( $MyInvocation.MyCommand.Name ) "
36
37
$psdFileContent = Get-Content - Path $ModulePath - Raw - ErrorAction Stop
37
38
$updatePsdFile = $false
@@ -52,10 +53,10 @@ else {
52
53
53
54
# Update ModuleVersion
54
55
$matchRegex = " (?<Front>ModuleVersion = ')(?<ModVersion>.+)(?<Back>')"
55
- $replaceMatch = ' ${Front}' + $Version + ' ${Back}'
56
+ $replaceMatch = ' ${Front}' + $cleanVersion + ' ${Back}'
56
57
57
- if (($psdFileContent -match $matchRegex ) -and ($Matches [' ModVersion' ] -ne $Version )) {
58
- Write-Output " Updating ModuleVersion to: $Version "
58
+ if (($psdFileContent -match $matchRegex ) -and ($Matches [' ModVersion' ] -ne $cleanVersion )) {
59
+ Write-Output " Updating ModuleVersion to: $cleanVersion "
59
60
$psdFileContent = $psdFileContent -replace $matchRegex , $replaceMatch
60
61
$updatePsdFile = $true
61
62
}
You can’t perform that action at this time.
0 commit comments