mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Try to automate Jenkins publishing
This commit is contained in:
parent
20fe89edbc
commit
f0a05a8256
14
build.gradle
14
build.gradle
@ -91,7 +91,7 @@ static def getDate() {
|
||||
task buildProperties {
|
||||
ant.propertyfile(file: "$project.rootDir/src/main/resources/build.properties") {
|
||||
entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown")
|
||||
entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") + " (Jenkins)": getBuildNumber())
|
||||
entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") + " (Jenkins)" : getBuildNumber())
|
||||
entry(key: "buildDate", value: getDate())
|
||||
entry(key: "buildHead", value: getGitHash())
|
||||
}
|
||||
@ -159,4 +159,16 @@ task publishRelease {
|
||||
|
||||
task publishSnapshot {
|
||||
dependsOn(publishPlexSnapshotsPublicationToMaven2Repository)
|
||||
}
|
||||
|
||||
task jenkinsPublish {
|
||||
if (System.getenv("plex_repo_user") == "jenkins") {
|
||||
if (System.getenv("plex_repo_user") != null && System.getenv("plex_repo_user") == "jenkins") {
|
||||
if (!getVersion().toString().toLowerCase().endsWith("-snapshot")) {
|
||||
dependsOn(publishPlexReleasesPublicationToMavenRepository)
|
||||
} else {
|
||||
dependsOn(publishPlexSnapshotsPublicationToMaven2Repository)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user