Minor revisions/updates for win32 packager (#3651)

* more tweaks for the build server and packaging

* more tweaks for the build server and packaging

* fixed appveyor variable names

* Revert to old regex

* Fixed typo

* Used wrong braces

* Normalizing separators
This commit is contained in:
Joseph Lenox 2017-01-02 17:33:42 -06:00 committed by GitHub
parent 16df4df8f8
commit 586d95b28a

View File

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