From 2f5a970a4e2d822735752f1be337f8d85e4cb44c Mon Sep 17 00:00:00 2001 From: CatChow0 Date: Wed, 8 Oct 2025 18:06:27 +0200 Subject: [PATCH] Jenkins Test #11 --- Jenkinsfile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e56bf39..b39be6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,23 +52,28 @@ pipeline { stage('Package Debug') { when { expression { params.BUILD_TYPE in ['Both','Debug'] } } steps { - bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"' - bat """ - powershell -Command ^ - "Compress-Archive -Path \\\"%WORKSPACE%\\\\**\\\\Debug\\\\*\\\" ^ - -DestinationPath \\\"%WORKSPACE%\\\\builds\\\\KhaoticEngineReborn_Debug.zip\\\" -Force" - """ + powershell """ + if (-Not (Test-Path \"${env.WORKSPACE}\\builds\")) { + New-Item -ItemType Directory -Path \"${env.WORKSPACE}\\builds\" | Out-Null + } + Compress-Archive -Path \"${env.WORKSPACE}\\**\\Debug\\*\" ` + -DestinationPath \"${env.WORKSPACE}\\builds\\KhaoticEngineReborn_Debug.zip\" ` + -Force + """ + } } stage('Package Release') { when { expression { params.BUILD_TYPE in ['Both','Release'] } } steps { - bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"' - bat """ - powershell -Command ^ - "Compress-Archive -Path \\\"%WORKSPACE%\\\\**\\\\Release\\\\*\\\" ^ - -DestinationPath \\\"%WORKSPACE%\\\\builds\\\\KhaoticEngineReborn_Release.zip\\\" -Force" - """ + powershell """ + if (-Not (Test-Path \"${env.WORKSPACE}\\builds\")) { + New-Item -ItemType Directory -Path \"${env.WORKSPACE}\\builds\" | Out-Null + } + Compress-Archive -Path \"${env.WORKSPACE}\\**\\Release\\*\" ` + -DestinationPath \"${env.WORKSPACE}\\builds\\KhaoticEngineReborn_Release.zip\" ` + -Force + """ } } }