Permalink
Browse files

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
1 parent 16df4df commit 586d95b28a8e473bdcbd959f1e37d215ae531df5 @lordofhyphens lordofhyphens committed on GitHub Jan 2, 2017
Showing with 12 additions and 6 deletions.
  1. +12 −6 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,17 +135,17 @@ 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"
del ..\slic3r.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

0 comments on commit 586d95b

Please sign in to comment.