From c18e642903080913a2d8ea248489e9bad8277a42 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 11 Jun 2022 16:36:47 +0200 Subject: [PATCH] Jenkinsfile: Don't run strip on executables when UPX is installed on the host Signed-off-by: Username404 --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index dcf395c..4d3ca2b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,9 @@ def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch cmakeArgs: "--no-warn-unused-cli -DCMAKE_SYSTEM_NAME=\"${system_name}\" -DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ -DCMAKE_LINKER=${fileExists("${linker}.gold") ? "${linker}.gold" : linker} -DCMAKE_AR=/usr/bin/${path}-ar -DCMAKE_RC_COMPILER=/usr/bin/${path}-windres -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${packageArch} -DCMAKE_EXE_LINKER_FLAGS=-static -DIGNORE_MINIMAL_COMPILER_VERSION=ON ${no_compilation_cache_flags()}", generator: cmake_generator() cmake arguments: "--build ./$build_directory --target ybcon", installation: 'Latest' - sh "/usr/bin/${path}-strip -s ./$build_directory/ybcon*" + if (!fileExists('/usr/bin/upx')) { + sh "/usr/bin/${path}-strip -s ./$build_directory/ybcon*" + } cpack installation: 'Latest', workingDir: build_directory }