From 508b5d461e9c00cea82d11c2675a05f2cdb1c4a7 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 21 Apr 2017 02:50:18 +0200 Subject: [PATCH] Jenkinsfile: Don't attempt to download UPX if it will be skipped. --- Jenkinsfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 029f64e..8aeae38 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,26 +9,26 @@ def binext(os) { def upx(file) { // Install upx - withEnv(["PATH+=${tool "UPX v3.91"}"]) { - switch("${env.GOOS}.${env.GOARCH}") { - case "linux.amd64": - case "linux.386": - case "darwin.amd64": - case "darwin.arm": - case "windows.amd64": - case "windows.386": - case "freebsd.386": - case "netbsd.386": + switch("${env.GOOS}.${env.GOARCH}") { + case "linux.amd64": + case "linux.386": + case "darwin.amd64": + case "darwin.arm": + case "windows.amd64": + case "windows.386": + case "freebsd.386": + case "netbsd.386": + withEnv(["PATH+=${tool "UPX v3.91"}"]) { if (env.GOOS == "linux") { sh "GOOS= GOARCH= go get -v github.com/pwaller/goupx" sh "goupx --no-upx \"$file\"" } sh "upx --best --ultra-brute \"$file\"" - break - default: - echo "Skipping UPX compression as it is not supported for $goos/$goarch." - break - } + } + break + default: + echo "Skipping UPX compression as it is not supported for $goos/$goarch." + break } }