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,9 +13,15 @@ New-Variable -Name "current_date" -Value "$(Get-Date -UFormat '%Y.%m.%d')"
New-Variable -Name "output_file" -Value ""
git branch | foreach {
if ($env:APPVEYOR) {
if ($_ -match "` (.*)") {
$current_branch += $matches[1]
}
} else {
if ($_ -match "\*` (.*)"){
$current_branch += $matches[1]
}
}
}
if ($exe) {
$output_file = "slic3r.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