diff --git a/CzechQuests_Mainline.toc b/CzechQuests_Mainline.toc index bd50984..e4b4ca4 100755 --- a/CzechQuests_Mainline.toc +++ b/CzechQuests_Mainline.toc @@ -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 diff --git a/CzechQuests_Vanilla.toc b/CzechQuests_Vanilla.toc index 087af64..1448fdb 100755 --- a/CzechQuests_Vanilla.toc +++ b/CzechQuests_Vanilla.toc @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile index b0f72f2..20cd4ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() } } \ No newline at end of file