BinTray generic repo publishing - take 2
This commit is contained in:
parent
de584076ec
commit
41e7bd2cd4
|
@ -5,7 +5,7 @@
|
||||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||||
*/
|
*/
|
||||||
plugins {
|
plugins {
|
||||||
id "com.jfrog.bintray" version "1.3.1"
|
id "com.jfrog.bintray" version "1.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'base'
|
apply plugin: 'base'
|
||||||
|
@ -214,19 +214,30 @@ task uploadBundlesSourceForge(type: Exec, dependsOn: buildBundles) {
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
if ( version.endsWith( "SNAPSHOT" ) ) {
|
if ( version.endsWith( "SNAPSHOT" ) ) {
|
||||||
logger.error( "Cannot perform upload of SNAPSHOT documentation" );
|
logger.error( "Cannot perform upload of SNAPSHOT bundles to SourceForge" );
|
||||||
throw new RuntimeException( "Cannot perform upload of SNAPSHOT bundles" )
|
throw new RuntimeException( "Cannot perform upload of SNAPSHOT bundles to SourceForge" )
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.lifecycle( "Uploading release bundles [${url}]..." )
|
logger.lifecycle( "Uploading release bundles to SourceForge..." )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle( 'Done uploading release bundles' )
|
logger.lifecycle( 'Done uploading release bundles to SourceForge' )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
bundles {
|
||||||
|
description = 'Configuration used to group the archives output from the distribution plugin.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
bundles distTar
|
||||||
|
bundles distZip
|
||||||
|
}
|
||||||
|
|
||||||
String binTrayUser = null
|
String binTrayUser = null
|
||||||
String binTrayApiKey = null
|
String binTrayApiKey = null
|
||||||
|
|
||||||
|
@ -256,27 +267,45 @@ if ( binTrayApiKey == null ) {
|
||||||
binTrayApiKey = 'UNDEFINED'
|
binTrayApiKey = 'UNDEFINED'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
user = binTrayUser
|
user = binTrayUser
|
||||||
key = binTrayApiKey
|
key = binTrayApiKey
|
||||||
|
|
||||||
publish = true
|
publish = true
|
||||||
|
|
||||||
filesSpec {
|
configurations = ['bundles']
|
||||||
from "$buildDir/distributions"
|
|
||||||
into '/'
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg {
|
pkg {
|
||||||
userOrg = 'hibernate'
|
userOrg = 'hibernate'
|
||||||
repo = 'bundles'
|
repo = 'bundles'
|
||||||
name = 'hibernate-orm'
|
name = 'hibernate-orm'
|
||||||
|
|
||||||
|
version {
|
||||||
|
name = project.version
|
||||||
|
desc = "The ${project.version} release of the Hibernate ORM project"
|
||||||
|
|
||||||
|
gpg {
|
||||||
|
sign = true
|
||||||
|
passphrase = 'hibernate'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bintrayUpload.dependsOn buildBundles
|
bintrayUpload.dependsOn buildBundles
|
||||||
|
|
||||||
|
bintrayUpload {
|
||||||
|
doFirst {
|
||||||
|
if ( version.endsWith( "SNAPSHOT" ) ) {
|
||||||
|
logger.error( "Cannot perform upload of SNAPSHOT bundles to BinTray" );
|
||||||
|
throw new RuntimeException( "Cannot perform upload of SNAPSHOT bundles to BinTray" )
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
logger.lifecycle( "Uploading release bundles to BinTray..." )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task uploadBundles(dependsOn: [bintrayUpload, uploadBundlesSourceForge]) {
|
task uploadBundles(dependsOn: [bintrayUpload, uploadBundlesSourceForge]) {
|
||||||
description = 'Performs all release bundle uploads'
|
description = 'Performs all release bundle uploads'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue