Add Jenkinsfile
Some checks failed
forgejo/Czech Quests/addon/pipeline/head There was a failure building this commit
Some checks failed
forgejo/Czech Quests/addon/pipeline/head There was a failure building this commit
This commit is contained in:
parent
45c722e271
commit
29b3a7336d
1 changed files with 44 additions and 0 deletions
44
Jenkinsfile
vendored
Normal file
44
Jenkinsfile
vendored
Normal file
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue