Commit d6308874 authored by Gradl, Tobias's avatar Gradl, Tobias

Minor finalizing steps for Gradle migration

parent b1b286fa
Pipeline #13402 passed with stages
in 4 minutes and 22 seconds
......@@ -40,6 +40,10 @@ ext {
coreVersion = "5.3.0-SNAPSHOT"
gtfVersion = "1.6.0-SNAPSHOT"
processingVersion = "3.8.0-SNAPSHOT"
// Filled dynamically by packaging tasks
debFile = ""
rpmFile = ""
}
dependencies {
......@@ -116,13 +120,18 @@ artifacts {
archives javadocJar
}
tasks.withType(Deb) {
dependsOn(classes)
doLast {
project.debFile = archiveName;
}
}
tasks.withType(Rpm) {
dependsOn(classes)
doLast {
project.rpmFile = archiveName;
}
}
ospackage {
......@@ -136,9 +145,9 @@ ospackage {
into "var/dfa/webapps/$project.name/"
from(configurations.runtime) {
/*from(configurations.runtime) {
into "WEB-INF/lib"
}
}*/
from("$buildDir/classes/java/main") {
into "WEB-INF/classes"
......@@ -218,14 +227,12 @@ publishing {
task publishDebPackage {
dependsOn buildDeb
def distroPath = "$buildDir/distributions/"
def debPackage = "dariah-${project.name}_${project.version}_noarch.deb"
doLast {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
println "Publishing Debian package $debPackage as user $repoUser";
println "Publishing Debian package $debFile as user $repoUser";
exec {
executable "curl"
args "-f", "-u", "$repoUser:$repoPass", "-H", "Content-Type: multipart/form-data", "--data-binary", "@$distroPath$debPackage", "$aptRepo";
args "-f", "-u", "$repoUser:$repoPass", "-H", "Content-Type: multipart/form-data", "--data-binary", "@$distroPath$debFile", "$aptRepo";
}
}
}
......@@ -234,14 +241,12 @@ task publishDebPackage {
task publishRpmPackage {
dependsOn buildRpm
def distroPath = "$buildDir/distributions/"
def rpmPackage = "dariah-${project.name}-${project.version}.noarch.rpm"
doLast {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
println "Publishing Rpm package $rpmPackage as user $repoUser";
println "Publishing Rpm package $rpmFile as user $repoUser";
exec {
executable "curl"
args "-f", "-u", "$repoUser:$repoPass", "--upload-file", "$distroPath$rpmPackage", "$yumRepo/dariah/${project.name}/${project.version}/$rpmPackage";
args "-f", "-u", "$repoUser:$repoPass", "--upload-file", "$distroPath$rpmFile", "$yumRepo/dariah/${project.name}/${project.version}/$rpmFile";
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment