Patch the jenkinsfile so it publishes using the correct credentials provided by Jenkins. (#8277)

This commit is contained in:
Marc Hermans authored and GitHub committed 2021-12-11 00:46:50 +10:30
1 parent 54f411ad98
commit 5a9520a591
1 file changed
+8 -5
+8 -5
View File
@@ -1211,12 +1211,15 @@ project(':forge') {
}
repositories {
maven {
if (project.hasProperty('forgeMavenPassword')) {
credentials {
username project.properties.forgeMavenUser
password project.properties.forgeMavenPassword
if (System.env.MAVEN_USER) {
url "https://maven.minecraftforge.net/releases/"
authentication {
basic(BasicAuthentication)
}
credentials {
username = System.env.MAVEN_USER ?: 'not'
password = System.env.MAVEN_PASSWORD ?: 'set'
}
url 'https://files.minecraftforge.net/maven/manage/upload'
} else {
url 'file://' + rootProject.file('repo').getAbsolutePath()
}