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