No longer allow to configure 'target' and default to 'Spigot'
This commit is contained in:
parent
3a72e11367
commit
1645fc3ee7
|
@ -19,7 +19,7 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# Action-SpigotMC
|
# Action-SpigotMC
|
||||||
This Action allows you to easily compile Minecraft Spigot
|
This Action allows you to easily compile Minecraft Spigot or Paper
|
||||||
and install it in your runners local maven repository.
|
and install it in your runners local maven repository.
|
||||||
|
|
||||||
Supported:
|
Supported:
|
||||||
|
@ -49,13 +49,6 @@ as they are set automatically.
|
||||||
# Example: latest, 1.14.4, 1.8.8
|
# Example: latest, 1.14.4, 1.8.8
|
||||||
versions: latest
|
versions: latest
|
||||||
|
|
||||||
# A comma-separated list of build targets
|
|
||||||
# This value is later given to the BuildTools.jar as '--compile' argument
|
|
||||||
#
|
|
||||||
# Available: None, Spigot, CraftBukkit
|
|
||||||
# Example: Spigot, CraftBukkit
|
|
||||||
target: Spigot
|
|
||||||
|
|
||||||
# Should sources be generated?
|
# Should sources be generated?
|
||||||
# If enabled, BuildTools is provided the '--generate-source' argument
|
# If enabled, BuildTools is provided the '--generate-source' argument
|
||||||
generateSrc: false
|
generateSrc: false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: Compile Minecraft Spigot (BuildTools)
|
name: Compile Minecraft Spigot or Paper (BuildTools)
|
||||||
description: Makes it easier to compile multiple Spigot versions at the same time and speed up clean builds
|
description: Makes it easier to compile multiple Spigot/Paper versions at the same time and speed up clean builds
|
||||||
author: Christian Koop
|
author: Christian Koop
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
|
@ -11,10 +11,6 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: latest
|
default: latest
|
||||||
description: Versions to build (sperate multiple with ',')
|
description: Versions to build (sperate multiple with ',')
|
||||||
target:
|
|
||||||
required: false
|
|
||||||
default: Spigot
|
|
||||||
description: Select what exactly you want to compile (none, Spigot, CraftBukkit) (sperate multiple with ',')
|
|
||||||
generateSrc:
|
generateSrc:
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,6 @@ const supportedBuildTools: { [key: string]: { url: string, prepareArgs: string[]
|
||||||
/* GitHub Actions inputs */
|
/* GitHub Actions inputs */
|
||||||
const buildToolProvider: string = (core.getInput('buildToolProvider') || 'SpraxDev').toLowerCase();
|
const buildToolProvider: string = (core.getInput('buildToolProvider') || 'SpraxDev').toLowerCase();
|
||||||
let versions: string[] = fixArgArr((core.getInput('versions') || 'latest').toLowerCase().split(','));
|
let versions: string[] = fixArgArr((core.getInput('versions') || 'latest').toLowerCase().split(','));
|
||||||
const target: string[] = fixArgArr((core.getInput('target') || 'Spigot').toUpperCase().split(','));
|
|
||||||
const generateSrc: boolean = core.getInput('generateSrc') == 'true';
|
const generateSrc: boolean = core.getInput('generateSrc') == 'true';
|
||||||
const generateDoc: boolean = core.getInput('generateDoc') == 'true';
|
const generateDoc: boolean = core.getInput('generateDoc') == 'true';
|
||||||
const disableJavaCheck: boolean = core.getInput('disableJavaCheck') == 'true';
|
const disableJavaCheck: boolean = core.getInput('disableJavaCheck') == 'true';
|
||||||
|
@ -45,7 +44,6 @@ async function run(): Promise<{ code: number, msg?: string }> {
|
||||||
return new Promise(async (resolve, reject): Promise<void> => {
|
return new Promise(async (resolve, reject): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
if (versions.length == 0) return resolve({code: 0, msg: 'No version(s) provided to build'});
|
if (versions.length == 0) return resolve({code: 0, msg: 'No version(s) provided to build'});
|
||||||
if (target.length == 0) return resolve({code: 0, msg: 'No target(s) provided to build'});
|
|
||||||
|
|
||||||
if (!Object.keys(supportedBuildTools).includes(buildToolProvider)) {
|
if (!Object.keys(supportedBuildTools).includes(buildToolProvider)) {
|
||||||
return reject(new Error(`'${buildToolProvider}' is not a valid BuildTool-Provider (${Object.keys(supportedBuildTools).join(', ')})`));
|
return reject(new Error(`'${buildToolProvider}' is not a valid BuildTool-Provider (${Object.keys(supportedBuildTools).join(', ')})`));
|
||||||
|
@ -91,7 +89,7 @@ async function run(): Promise<{ code: number, msg?: string }> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const buildToolsArgs = ['-jar', 'BuildTools.jar', '--compile', target.join(',')];
|
const buildToolsArgs = ['-jar', 'BuildTools.jar', '--compile', 'Spigot'];
|
||||||
|
|
||||||
if (generateSrc) {
|
if (generateSrc) {
|
||||||
buildToolsArgs.push('--generate-source');
|
buildToolsArgs.push('--generate-source');
|
||||||
|
|
Loading…
Reference in New Issue