mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 09:51:01 -05:00
name
can be omitted with an empty string
This commit is contained in:
parent
fcfbc7c0f9
commit
28b0fcda55
3 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ export default class CurseForgePublisher extends ModPublisher {
|
|||
const data = {
|
||||
changelog,
|
||||
changelogType: "markdown",
|
||||
displayName: name,
|
||||
displayName: (parentFileId || !name) ? file.name : name,
|
||||
parentFileID: parentFileId,
|
||||
releaseType: channel,
|
||||
gameVersions: parentFileId ? undefined : versions
|
||||
|
|
|
@ -57,7 +57,7 @@ export default abstract class ModPublisher extends Publisher<ModPublisherOptions
|
|||
|
||||
const version = (typeof options.version === "string" && options.version) || <string>releaseInfo?.tag_name || parseVersionFromFilename(files[0].name);
|
||||
const versionType = options.versionType?.toLowerCase() || parseVersionTypeFromFilename(files[0].name);
|
||||
const name = (typeof options.name === "string" && options.name) || <string>releaseInfo?.name || version;
|
||||
const name = typeof options.name === "string" ? options.name : (<string>releaseInfo?.name || version);
|
||||
const changelog = ((typeof options.changelog === "string" || options.changelog?.file) ? (await readChangelog(options.changelog)) : <string>releaseInfo?.body) || "";
|
||||
|
||||
const loaders = processMultilineInput(options.loaders, /\s+/);
|
||||
|
|
|
@ -10,7 +10,7 @@ export default class ModrinthPublisher extends ModPublisher {
|
|||
|
||||
protected async publishMod(id: string, token: string, name: string, version: string, channel: string, loaders: string[], gameVersions: string[], _java: string[], changelog: string, files: File[]): Promise<void> {
|
||||
const data = {
|
||||
version_title: name,
|
||||
version_title: name || version,
|
||||
version_number: version,
|
||||
version_body: changelog,
|
||||
release_channel: channel,
|
||||
|
|
Loading…
Reference in a new issue