File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ if (Test-Path Env:\APPVEYOR_BUILD_VERSION)
3636if ($env: APPVEYOR_REPO_TAG -eq " True" )
3737{
3838 $Version = " $env: APPVEYOR_REPO_TAG_NAME " .Substring(1 ) # trim leading "v"
39- $AssemblyVersion = $Version
39+ $AssemblyVersion = $Version
40+ # Stip the -pre
41+ if ($AssemblyVersion.Contains (" -pre" ))
42+ {
43+ $AssemblyVersion = $AssemblyVersion.Substring (0 , $AssemblyVersion.IndexOf (" -pre" ))
44+ }
4045 Write-Diagnostic " Setting Version based on tag to $Version "
41- Write-Diagnostic " Setting AssemblyVersion based on tag to $AssemblyVersion "
46+ Write-Diagnostic " Setting AssemblyVersion based on tag to $AssemblyVersion "
4247}
4348
4449# https://github.com/jbake/Powershell_scripts/blob/master/Invoke-BatchFile.ps1
You can’t perform that action at this time.
0 commit comments