Some checks failed
forgejo/Czech Quests/addon/pipeline/head There was a failure building this commit
44 lines
No EOL
915 B
Groovy
44 lines
No EOL
915 B
Groovy
@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
|
|
}
|
|
} |