mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-29 05:55:19 +01:00
ci: Fixed version bumping
This commit is contained in:
parent
fd6ef9ac08
commit
4278cd5d7a
@ -1,7 +1,8 @@
|
||||
let versionRegex = /(\nversion=)([0-9.-]+)/;
|
||||
let versionRegex = /(\nversion:\s)([0-9.-]+)/;
|
||||
let velocityVersionRegex = /(\sversion\s=\s")([0-9.-]+)("\))/;
|
||||
|
||||
const tracker = {
|
||||
filename: 'gradle.properties',
|
||||
const plugin = {
|
||||
filename: 'src/main/resources/plugin.yml',
|
||||
updater: {
|
||||
'readVersion': (contents) => {
|
||||
return versionRegex.exec(contents)[2];
|
||||
@ -12,7 +13,19 @@ const tracker = {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
bumpFiles: [tracker],
|
||||
packageFiles: [tracker]
|
||||
const velocity_plugin = {
|
||||
filename: 'src/main/java/com/sekwah/advancedportals/velocity/AdvancedPortalsPlugin.java',
|
||||
updater: {
|
||||
'readVersion': (contents) => {
|
||||
return velocityVersionRegex.exec(contents)[2];
|
||||
},
|
||||
'writeVersion': (contents, version) => {
|
||||
return contents.replace(velocityVersionRegex, `$1${version}$3`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
bumpFiles: [plugin, velocity_plugin],
|
||||
packageFiles: [plugin, velocity_plugin]
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||
import com.velocitypowered.api.plugin.Plugin;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import com.velocitypowered.api.proxy.ServerConnection;
|
||||
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
|
||||
import com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user