Jenkinsfile: Replace UPX regex cases with constant strings.

pull/10/head
Icedream 2017-04-21 02:36:14 +02:00
parent 11201d12c9
commit f148c09563
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 8 additions and 4 deletions

12
Jenkinsfile vendored
View File

@ -12,10 +12,14 @@ def upx(file) {
tool "UPX v3.91"
switch("${env.GOOS}.${env.GOARCH}") {
case ~/linux\.(amd64|386)/:
case ~/darwin\.(amd64|arm)/:
case ~/windows\..+/:
case ~/.+bsd\.386/:
case "linux.amd64":
case "linux.386":
case "darwin.amd64":
case "darwin.arm":
case "windows.amd64":
case "windows.386":
case "freebsd.386":
case "netbsd.386":
if (env.GOOS == "linux") {
sh "GOOS= GOARCH= go get -v github.com/pwaller/goupx"
sh "goupx --no-upx \"$file\""