File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99jobs :
1010 build :
1111 runs-on : windows-latest
12+
1213 steps :
1314 - uses : actions/checkout@v3
1415
16+ # Install BuildHelpers with AllowClobber
1517 - name : Install BuildHelpers with AllowClobber
1618 shell : pwsh
1719 run : |
1820 Install-Module BuildHelpers -Force -AllowClobber -Scope CurrentUser
1921 Import-Module BuildHelpers -Force
2022
23+ # Patch Update-Metadata to avoid PropertyName error
24+ - name : Patch Update-Metadata
25+ shell : pwsh
26+ run : |
27+ function Update-Metadata {
28+ param (
29+ [string]$Path,
30+ [string]$PropertyName = 'ModuleVersion',
31+ $Value
32+ )
33+ $content = Get-Content $Path -Raw
34+ $pattern = "$PropertyName\s*=\s*'[^']*'"
35+ if ($content -match $pattern) {
36+ $content = $content -replace $pattern, "$PropertyName = '$Value'"
37+ } else {
38+ Write-Warning "Property $PropertyName not found, appending."
39+ $content += "`n$PropertyName = '$Value'"
40+ }
41+ Set-Content -Path $Path -Value $content -Encoding UTF8
42+ Write-Host "Updated '$PropertyName' in $Path"
43+ }
44+ Set-Alias -Name Update-Metadata -Value Update-Metadata -Scope Global
45+
2146 - name : Check if version has been bumped
2247 shell : pwsh
2348 id : check_if_versions_bumped
You can’t perform that action at this time.
0 commit comments