ci: Fix issue with wrong dev mode

This commit is contained in:
Sekwah 2021-05-12 02:52:43 +01:00
parent ae518bea39
commit e8cbb403c5
No known key found for this signature in database
GPG Key ID: C3BE2E6C861A461A
5 changed files with 29 additions and 6 deletions

View File

@ -1,6 +1,17 @@
let versionRegex = /(\nversion:\s)([0-9.-]+)/;
let velocityVersionRegex = /(\sversion\s=\s")([0-9.-]+)("\))/;
const ymlUpdater = {
updater: {
'readVersion': (contents) => {
return versionRegex.exec(contents)[2];
},
'writeVersion': (contents, version) => {
return contents.replace(versionRegex, `$1${version}`);
}
}
}
const plugin = {
filename: 'src/main/resources/plugin.yml',
updater: {
@ -13,6 +24,16 @@ const plugin = {
}
}
const bungee = {
filename: 'src/main/resources/bungee.yml',
...ymlUpdater,
}
const plugin = {
filename: 'src/main/resources/plugin.yml',
...ymlUpdater,
}
const velocity_plugin = {
filename: 'src/main/java/com/sekwah/advancedportals/velocity/AdvancedPortalsPlugin.java',
updater: {
@ -25,7 +46,9 @@ const velocity_plugin = {
}
}
const files = [plugin, velocity_plugin, bungee];
module.exports = {
bumpFiles: [plugin, velocity_plugin],
packageFiles: [plugin, velocity_plugin]
bumpFiles: files,
packageFiles: files
}

View File

@ -28,7 +28,7 @@ apply plugin: 'eclipse'
def branch = System.getenv("GITHUB_REF");
def sha = System.getenv("GITHUB_SHA");
def isDevBranch = branch == null || !(branch.startsWith("refs/tags/") && branch.contains("-"))
def isDevBranch = branch == null || !(branch.startsWith("refs/tags/") && !branch.contains("-"))
group = 'com.sekwah.advancedportals'
version = getPluginData("version") + (isDevBranch ? '-SNAPSHOT' : '')

View File

@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit;
*/
@Plugin(id = "advancedportals", name = "Advanced Portals",
url = "https://www.spigotmc.org/resources/advanced-portals.14356/",
version = "0.5.14-0")
version = "0.5.13-0")
public class AdvancedPortalsPlugin {
public HashMap<String, String[]> PlayerDestiMap = new HashMap<>();

View File

@ -1,4 +1,4 @@
main: com.sekwah.advancedportals.bungee.AdvancedPortalsPlugin
name: AdvancedPortals
version: 0.5.13
version: 0.5.13-0
author: sekwah41

View File

@ -1,6 +1,6 @@
main: com.sekwah.advancedportals.bukkit.AdvancedPortalsPlugin
name: AdvancedPortals
version: 0.5.14-0
version: 0.5.13-0
author: sekwah41
description: An advanced portals plugin for bukkit.
api-version: 1.13