Always tag client jar with forge artifact version.
This allows multiple versions of the same forge to be used. Ex. Recommended 1.15 on prod, latest 1.15 on test. Also fixed a bug with artifact classifier formatting.
This commit is contained in:
@@ -212,11 +212,15 @@ export class Forge113Adapter extends ForgeResolver {
|
|||||||
const exists = await pathExists(targetLocalPath)
|
const exists = await pathExists(targetLocalPath)
|
||||||
if (exists) {
|
if (exists) {
|
||||||
|
|
||||||
|
// Always tag destination with artifact version.
|
||||||
|
// Allows different versions of forge to be installed at once.
|
||||||
|
// Ex. Recommended 1.15 on prod, latest 1.15 on test.
|
||||||
|
|
||||||
mdls.push({
|
mdls.push({
|
||||||
id: MavenUtil.mavenComponentsToIdentifier(
|
id: MavenUtil.mavenComponentsToIdentifier(
|
||||||
entry.group,
|
entry.group,
|
||||||
entry.artifact,
|
entry.artifact,
|
||||||
entry.version,
|
this.artifactVersion,
|
||||||
entry.classifier
|
entry.classifier
|
||||||
),
|
),
|
||||||
name: `Minecraft Forge (${entry.name})`,
|
name: `Minecraft Forge (${entry.name})`,
|
||||||
@@ -228,7 +232,7 @@ export class Forge113Adapter extends ForgeResolver {
|
|||||||
this.baseUrl,
|
this.baseUrl,
|
||||||
entry.group,
|
entry.group,
|
||||||
entry.artifact,
|
entry.artifact,
|
||||||
entry.version,
|
entry.version, // work dir version
|
||||||
entry.classifier
|
entry.classifier
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@@ -238,7 +242,7 @@ export class Forge113Adapter extends ForgeResolver {
|
|||||||
const destination = this.repoStructure.getLibRepoStruct().getArtifactByComponents(
|
const destination = this.repoStructure.getLibRepoStruct().getArtifactByComponents(
|
||||||
entry.group,
|
entry.group,
|
||||||
entry.artifact,
|
entry.artifact,
|
||||||
entry.version,
|
this.artifactVersion,
|
||||||
entry.classifier
|
entry.classifier
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export class MavenUtil {
|
|||||||
|
|
||||||
public static mavenComponentsToIdentifier(group: string, artifact: string, version: string,
|
public static mavenComponentsToIdentifier(group: string, artifact: string, version: string,
|
||||||
classifier?: string, extension?: string) {
|
classifier?: string, extension?: string) {
|
||||||
return `${group}:${artifact}:${version}${classifier != null ? `-${classifier}` : ''}${extension != null ? `@${extension}` : ''}`
|
return `${group}:${artifact}:${version}${classifier != null ? `:${classifier}` : ''}${extension != null ? `@${extension}` : ''}`
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isMavenIdentifier(id: string): boolean {
|
public static isMavenIdentifier(id: string): boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user