You've already forked AstralRinth
forked from didirus/AstralRinth
Fix two bugs with Forge mod exporting (#1187)
This commit is contained in:
@@ -14,13 +14,7 @@ export const createDataPackVersion = async function (
|
|||||||
? version.version_number
|
? version.version_number
|
||||||
: `1-${version.version_number}`
|
: `1-${version.version_number}`
|
||||||
|
|
||||||
const targetStartingDigitsRegex = /^(\d+)(\D+)$/g
|
const newSlug = `mr_${project.slug.replace('-', '_').replace(/\W/g, '')}`.substring(0, 63)
|
||||||
const newSlug = `${project.slug
|
|
||||||
.replace('-', '_')
|
|
||||||
.replace(/\W/g, '')
|
|
||||||
.replace(targetStartingDigitsRegex, '$2')
|
|
||||||
.replace(/^(\d+)$/g, project.id.replace(targetStartingDigitsRegex, '$2'))
|
|
||||||
.substring(0, 63)}_mr`
|
|
||||||
|
|
||||||
const iconPath = `${project.slug}_pack.png`
|
const iconPath = `${project.slug}_pack.png`
|
||||||
|
|
||||||
@@ -102,7 +96,7 @@ export const createDataPackVersion = async function (
|
|||||||
displayName: project.title,
|
displayName: project.title,
|
||||||
description: project.description,
|
description: project.description,
|
||||||
logoFile: iconPath,
|
logoFile: iconPath,
|
||||||
updateJSONURL: `${getAuthUrl().replace('/v2/', '')}/updates/${
|
updateJSONURL: `${config.public.apiBaseUrl.replace('/v2/', '')}/updates/${
|
||||||
project.id
|
project.id
|
||||||
}/forge_updates.json`,
|
}/forge_updates.json`,
|
||||||
credits: 'Generated by Modrinth',
|
credits: 'Generated by Modrinth',
|
||||||
|
|||||||
Reference in New Issue
Block a user