Remove GAME parameter from Jenkins and set same versions
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
All checks were successful
forgejo/Czech Quests/addon/pipeline/head This commit looks good
This commit is contained in:
parent
cc59976f0a
commit
53c5c1dc9f
3 changed files with 17 additions and 33 deletions
|
@ -2,7 +2,7 @@
|
|||
## Title: CzechQuests
|
||||
## Notes: Addon displays texts of quests in Czech language
|
||||
## Author: Roman Jaroš
|
||||
## Version: 0.2.15
|
||||
## Version: 1.0.0
|
||||
## SavedVariables: CzechQuestsAddon_Store
|
||||
## Category: Translations
|
||||
## IconTexture: Interface\AddOns\CzechQuests\Assets\Icons\Logo
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
## Title: CzechQuests
|
||||
## Notes: Addon displays texts of quests in Czech language as tooltip
|
||||
## Author: Roman Jaroš
|
||||
## Version: 0.1.16
|
||||
## Version: 1.0.0
|
||||
## SavedVariables: CzechQuestsAddon_Store
|
||||
|
||||
CzechQuests.lua
|
||||
|
|
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
|
@ -7,25 +7,21 @@ def SKIP = "skip"
|
|||
properties([parameters([
|
||||
choice(
|
||||
name: 'RELEASE',
|
||||
choices: ['patch', 'minor', 'major'],
|
||||
choices: [SKIP, 'patch', 'minor', 'major'],
|
||||
description: 'Release new version'
|
||||
),
|
||||
choice(
|
||||
name: 'GAME',
|
||||
choices: [SKIP, 'classic_era', 'retail', 'all'],
|
||||
description: 'Create build with manual tag',
|
||||
)
|
||||
])])
|
||||
|
||||
def outputFolder = "CzechQuests"
|
||||
|
||||
def tocFiles = [
|
||||
"classic_era": "CzechQuests_Vanilla.toc",
|
||||
"retail" : "CzechQuests_Mainline.toc"
|
||||
]
|
||||
|
||||
def readToCVersion = { String tocFile ->
|
||||
def readToCVersion = { ->
|
||||
return sh(
|
||||
script: "grep '## Version:' $tocFile | cut -d ' ' -f 3",
|
||||
script: "grep '## Version:' ${tocFiles['classic_era']} | cut -d ' ' -f 3",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
}
|
||||
|
@ -51,7 +47,7 @@ def createZipFile = { String game ->
|
|||
sh "find . -name '*.ttf' -exec rsync -av {} $outputFolder \\;"
|
||||
|
||||
// get version
|
||||
def currentVersion = readToCVersion(tocFile)
|
||||
def currentVersion = readToCVersion()
|
||||
def newVersion = ReleaseUtils.increaseVersion(currentVersion, params.RELEASE)
|
||||
|
||||
// create zip
|
||||
|
@ -65,9 +61,8 @@ def createZipFile = { String game ->
|
|||
writeToCVersion(tocFile, currentVersion, newVersion)
|
||||
}
|
||||
|
||||
def pushToGit = { String game ->
|
||||
def tocFile = tocFiles[game]
|
||||
def version = readToCVersion(tocFile)
|
||||
def pushToGit = { ->
|
||||
def version = readToCVersion()
|
||||
def tag = "v$version"
|
||||
sh "git checkout ${BRANCH_NAME}"
|
||||
sh "git add *.toc"
|
||||
|
@ -77,14 +72,14 @@ def pushToGit = { String game ->
|
|||
sh "git push origin $tag"
|
||||
}
|
||||
|
||||
def uploadToForgejo = { String game ->
|
||||
def tocFile = tocFiles[game]
|
||||
def version = readToCVersion(tocFile)
|
||||
def uploadToForgejo = { ->
|
||||
def version = readToCVersion()
|
||||
ForgejoRelease('czech-quests', 'addon', version)
|
||||
}
|
||||
|
||||
MasterJob [:], { ->
|
||||
if (game == SKIP) {
|
||||
def version = params.RELEASE
|
||||
if (version == SKIP) {
|
||||
currentBuild.result = 'SUCCESS'
|
||||
return
|
||||
}
|
||||
|
@ -92,24 +87,13 @@ MasterJob [:], { ->
|
|||
checkout scm
|
||||
|
||||
stageWhen('build') {
|
||||
def game = params.GAME
|
||||
if (game == "all") {
|
||||
createZipFile("classic_era")
|
||||
createZipFile("retail")
|
||||
} else {
|
||||
createZipFile(game)
|
||||
}
|
||||
createZipFile("classic_era")
|
||||
createZipFile("retail")
|
||||
forgejoGit()
|
||||
pushToGit(game)
|
||||
pushToGit()
|
||||
}
|
||||
|
||||
stageWhen('release') {
|
||||
def game = params.GAME
|
||||
if (game == "all") {
|
||||
uploadToForgejo("classic_era")
|
||||
uploadToForgejo("retail")
|
||||
} else {
|
||||
uploadToForgejo(game)
|
||||
}
|
||||
uploadToForgejo()
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue