Browse Source

Update builds for double dashes

Ruben 8 months ago
parent
commit
fe85c81ba1
2 changed files with 3 additions and 6 deletions
  1. 0 6
      Build/Build Avalonia.Win32.ps1
  2. 3 0
      Build/Get-VersionInfo.ps1

+ 0 - 6
Build/Build Avalonia.Win32.ps1

@@ -44,10 +44,4 @@ if (Test-Path $pdbPath) {
     Remove-Item -Path $pdbPath -Force
 }
 
-#Remove uninstended space
-Rename-Item -path $outputPath -NewName $outputPath.Replace(" ","")
-
-#remove uninstended double dashes
-Rename-Item -path $outputPath -NewName $outputPath.Replace("--","-")
-
 

+ 3 - 0
Build/Get-VersionInfo.ps1

@@ -11,6 +11,9 @@ $fileVersion = $xml.Project.PropertyGroup.FileVersion
 # Combine VersionPrefix and VersionSuffix
 $fullVersion = "$versionPrefix-$versionSuffix"
 
+# Replace double dashes with a single dash
+$fullVersion = $fullVersion -replace '--', '-'
+
 # Output the results for GitHub Actions
 Write-Output "::set-output name=version::$fullVersion"
 Write-Output "::set-output name=file-version::$fileVersion"