From 29b3a7336de7b1e9f9c32604d1b762c84a021d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Jaro=C5=A1?= Date: Sat, 8 Mar 2025 09:08:16 +0100 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6fb5e30 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +@Library('jenkins-lib') +import MasterJob + +def parametersArray = [ + choice( + name: 'RELEASE', + choices: ['patch', 'minor', 'major'], + description: 'Release new version' + ), + choice( + name: 'GAME', + choices: ['classic_era', 'retail'], + description: 'Create build with manual tag', + ) +] + +def tocFiles = [ + "classic_era": "CzechQuests_Vanilla.toc", + "retail": "CzechQuests_Mainline.toc" +] + +properties([parameters(parametersArray)]) + + MasterJob [:], { -> + checkout scm + + stageWhen('build') { + def game = params.GAME + def tocFileContent = readFile tocFiles[game] + + def version = sh( + script: "grep '## Version:' CzechQuests_Vanilla.toc | cut -d ' ' -f 3", + returnStdout: true + ).trim() + + print(version) + + // create zip + } + + stageWhen('release') { + // create new forgejo release and upload zip + } +} \ No newline at end of file