mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-12-28 17:44:54 -05:00
Changed some declarations from foo.bar
to fooBar
It helps with better target-specific options support
This commit is contained in:
parent
f491e136d1
commit
4989430f1a
2 changed files with 7 additions and 7 deletions
|
@ -19,10 +19,10 @@ async function main() {
|
|||
}
|
||||
|
||||
const options = { ...commonOptions, ...publisherOptions };
|
||||
const fileSelector = options.files && (typeof(options.files) === "string" || options.files.primary) ? options.files : gradleOutputSelector;
|
||||
const fileSelector = typeof options.filesPrimary === "string" ? { primary: options.filesPrimary, secondary: typeof options.filesSecondary === "string" ? options.filesSecondary : gradleOutputSelector["secondary"] } : typeof options.files === "string" ? options.files : gradleOutputSelector;
|
||||
const files = await getRequiredFiles(fileSelector);
|
||||
const retryAttempts = mapNumberInput(options.retry?.["attempts"]);
|
||||
const retryDelay = mapNumberInput(options.retry?.["delay"]);
|
||||
const retryAttempts = mapNumberInput(options.retryAttempts);
|
||||
const retryDelay = mapNumberInput(options.retryDelay);
|
||||
|
||||
const publisher = publisherFactory.create(target, logger);
|
||||
logger.info(`Publishing assets to ${targetName}...`);
|
||||
|
|
|
@ -18,12 +18,12 @@ interface ModPublisherOptions {
|
|||
loaders?: string | string[];
|
||||
name?: string;
|
||||
version?: string;
|
||||
changelog?: string | { file?: string };
|
||||
changelog?: string;
|
||||
changelogFile?: string;
|
||||
versionResolver?: string;
|
||||
gameVersions?: string | string[];
|
||||
java?: string | string[];
|
||||
dependencies?: string | string[];
|
||||
files?: string | { primary?: string, secondary?: string };
|
||||
}
|
||||
|
||||
function processMultilineInput(input: string | string[], splitter?: RegExp): string[] {
|
||||
|
@ -92,8 +92,8 @@ export default abstract class ModPublisher extends Publisher<ModPublisherOptions
|
|||
const name = typeof options.name === "string" ? options.name : (<string>releaseInfo?.name || version);
|
||||
const changelog = typeof options.changelog === "string"
|
||||
? options.changelog
|
||||
: options.changelog?.file
|
||||
? await readChangelog(options.changelog.file)
|
||||
: typeof options.changelogFile === "string"
|
||||
? await readChangelog(options.changelogFile)
|
||||
: <string>releaseInfo?.body || "";
|
||||
|
||||
const loaders = processMultilineInput(options.loaders, /\s+/);
|
||||
|
|
Loading…
Reference in a new issue