No longer allow to configure 'target' and default to 'Spigot'
This commit is contained in:
parent
3a72e11367
commit
1645fc3ee7
|
@ -19,7 +19,7 @@
|
|||
</p>
|
||||
|
||||
# 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.
|
||||
|
||||
Supported:
|
||||
|
@ -49,13 +49,6 @@ as they are set automatically.
|
|||
# Example: latest, 1.14.4, 1.8.8
|
||||
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?
|
||||
# If enabled, BuildTools is provided the '--generate-source' argument
|
||||
generateSrc: false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: Compile Minecraft Spigot (BuildTools)
|
||||
description: Makes it easier to compile multiple Spigot versions at the same time and speed up clean builds
|
||||
name: Compile Minecraft Spigot or Paper (BuildTools)
|
||||
description: Makes it easier to compile multiple Spigot/Paper versions at the same time and speed up clean builds
|
||||
author: Christian Koop
|
||||
|
||||
branding:
|
||||
|
@ -11,10 +11,6 @@ inputs:
|
|||
required: false
|
||||
default: latest
|
||||
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:
|
||||
required: 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 */
|
||||
const buildToolProvider: string = (core.getInput('buildToolProvider') || 'SpraxDev').toLowerCase();
|
||||
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 generateDoc: boolean = core.getInput('generateDoc') == '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> => {
|
||||
try {
|
||||
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)) {
|
||||
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) {
|
||||
buildToolsArgs.push('--generate-source');
|
||||
|
|
Loading…
Reference in New Issue