diff --git a/utils/package_win32.ps1 b/utils/package_win32.ps1 index 6349590c3..1311c4a48 100644 --- a/utils/package_win32.ps1 +++ b/utils/package_win32.ps1 @@ -13,8 +13,14 @@ New-Variable -Name "current_date" -Value "$(Get-Date -UFormat '%Y.%m.%d')" New-Variable -Name "output_file" -Value "" git branch | foreach { - if ($_ -match "\*` (.*)"){ - $current_branch += $matches[1] + if ($env:APPVEYOR) { + if ($_ -match "` (.*)") { + $current_branch += $matches[1] + } + } else { + if ($_ -match "\*` (.*)"){ + $current_branch += $matches[1] + } } } if ($exe) { @@ -129,8 +135,8 @@ pp ` # switch renaming based on whether or not using packaged exe or zip if ($exe) { - if (Test-Path variable:\APPVEYOR_BUILD_NUMBER) { - copy ..\slic3r.exe "..\slic3r-${current_branch}-${APPVEYOR_BUILD_NUMBER}-$(git rev-parse --short HEAD).exe" + if ($env:APPVEYOR) { + copy ..\slic3r.exe "..\slic3r-${current_branch}.${current_date}.${env:APPVEYOR_BUILD_NUMBER}.$(git rev-parse --short HEAD).exe" del ..\slic3r.exe } else { copy ..\slic3r.exe "..\slic3r-${current_branch}.${current_date}.$(git rev-parse --short HEAD).exe" @@ -138,8 +144,8 @@ if ($exe) { } } else { # make this more useful for not being on the appveyor server - if (Test-Path variable:\APPVEYOR_BUILD_NUMBER) { - copy ..\slic3r.par "..\slic3r-${current_branch}-${APPVEYOR_BUILD_NUMBER}-$(git rev-parse --short HEAD).zip" + if ($env:APPVEYOR) { + copy ..\slic3r.par "..\slic3r-${current_branch}.${current_date}.${env:APPVEYOR_BUILD_NUMBER}.$(git rev-parse --short HEAD).zip" } else { copy ..\slic3r.par "..\slic3r-${current_branch}.${current_date}.$(git rev-parse --short HEAD).zip" del ../slic3r.par