Permalink
Browse files

Added support for uploading release package to sourceforge

  • Loading branch information...
benfortuna committed Aug 22, 2015
1 parent 0b77e92 commit 4ccbcaf0a799688df50153ef27e6c0fb8df3587b
Showing with 51 additions and 14 deletions.
  1. +3 −14 build.gradle
  2. +48 −0 gradle/dist.gradle
View
@@ -9,7 +9,8 @@ buildscript {
dependencies {
// classpath 'org.ajoberstar:gradle-git:0.8.0'
// classpath 'me.trnl:github-release-gradle-plugin:0.1'
- classpath 'au.com.ish.gradle:release:2.2.2'
+ classpath 'au.com.ish.gradle:release:2.2.2',
+ 'org.hidetake:gradle-ssh-plugin:1.1.3'
}
}
@@ -19,9 +20,9 @@ apply plugin: 'osgi'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'release'
-apply plugin: 'distribution'
//apply plugin: 'github-pages'
//apply plugin: 'github'
+apply from: 'gradle/dist.gradle'
sourceCompatibility = 1.6
targetCompatibility = 1.6
@@ -165,15 +166,3 @@ uploadArchives {
}
}
}
-
-distributions {
- main {
- contents {
- from { ['README.md', 'LICENSE', 'AUTHORS', 'CHANGELOG', 'build/docs', 'build/libs']}
- }
- }
-}
-
-distTar {
- compression = Compression.GZIP
-}
View
@@ -0,0 +1,48 @@
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'org.hidetake:gradle-ssh-plugin:1.1.3'
+ }
+}
+
+apply plugin: 'distribution'
+apply plugin: 'org.hidetake.ssh'
+
+distributions {
+ main {
+ contents {
+ from { ['README.md', 'LICENSE', 'AUTHORS', 'CHANGELOG', 'build/docs', 'build/libs']}
+ }
+ }
+}
+
+distTar {
+ compression = Compression.GZIP
+}
+
+remotes {
+ sourceforge {
+ host = 'frs.sourceforge.net'
+ user = 'fortuna'
+ identity = file("${System.getProperty('user.home')}/.ssh/id_rsa")
+ }
+ sourceforge_shell {
+ host = 'shell.sourceforge.net'
+ user = 'fortuna'
+ identity = file("${System.getProperty('user.home')}/.ssh/id_rsa")
+ }
+}
+
+task uploadDist(dependsOn: 'assembleMainDist') << {
+ ssh.run {
+ session(remotes.sourceforge_shell) {
+ execute "mkdir -p /home/frs/project/ical4j/$project.name/$project.version"
+ }
+ session(remotes.sourceforge) {
+ put "$buildDir/distributions/$project.name-${project.version}.zip", "/home/frs/project/ical4j/$project.name/$project.version"
+ put "$buildDir/distributions/$project.name-${project.version}.tgz", "/home/frs/project/ical4j/$project.name/$project.version"
+ }
+ }
+}

0 comments on commit 4ccbcaf

Please sign in to comment.