Add milestone upload support
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
apply plugin: "com.jfrog.artifactory"
|
||||
|
||||
def isSnapshot = version?.endsWith("-SNAPSHOT")
|
||||
def isMilestone = version?.matches('^.*[.-]M\\d+$') || version?.matches('^.*[.-]RC\\d+$')
|
||||
|
||||
artifactory {
|
||||
contextUrl = 'https://repo.spring.io'
|
||||
publish {
|
||||
repository {
|
||||
repoKey = isSnapshot ? 'libs-snapshot-local' : 'libs-release-local'
|
||||
repoKey = 'libs-release-local'
|
||||
if (isSnapshot) {
|
||||
repoKey = 'libs-snapshot-local'
|
||||
} else if (isMilestone) {
|
||||
repoKey = 'libs-milestone-local'
|
||||
}
|
||||
if(project.hasProperty('artifactoryUsername')) {
|
||||
username = artifactoryUsername
|
||||
password = artifactoryPassword
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
def isSnapshot = version?.endsWith("-SNAPSHOT")
|
||||
def isMilestone = version?.matches('^.*[.-]M\\d+$') || version?.matches('^.*[.-]RC\\d+$')
|
||||
def isRelease = !(isSnapshot || isMilestone)
|
||||
|
||||
task deployArtifacts {
|
||||
group = 'Deploy tasks'
|
||||
description = "Deploys the artifacts to either Artifactory or Maven Central"
|
||||
if(isSnapshot) {
|
||||
dependsOn "artifactoryPublish"
|
||||
} else {
|
||||
if(isRelease) {
|
||||
dependsOn "uploadArchives"
|
||||
} else {
|
||||
dependsOn "artifactoryPublish"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
def isSnapshot = version?.endsWith("-SNAPSHOT")
|
||||
def isRelease = !isSnapshot
|
||||
def isMilestone = version?.matches('^.*[.-]M\\d+$') || version?.matches('^.*[.-]RC\\d+$')
|
||||
def isRelease = !(isSnapshot || isMilestone)
|
||||
|
||||
task finalizeDeployArtifacts {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
def isSnapshot = version?.endsWith("-SNAPSHOT")
|
||||
def isRelease = !isSnapshot
|
||||
def isMilestone = version?.matches('^.*[.-]M\\d+$') || version?.matches('^.*[.-]RC\\d+$')
|
||||
def isRelease = !(isSnapshot || isMilestone)
|
||||
|
||||
if(project.hasProperty("signing.keyId") && isRelease) {
|
||||
apply plugin: "signing"
|
||||
|
||||
Reference in New Issue
Block a user