diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-12-20 18:52:04 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2015-12-20 18:57:18 +0100 |
commit | 30471be35c083cd37dcad2afb2acdd2a2908f864 (patch) | |
tree | 8b3b4ac3e37e4b69dbe495f810edd09f7f91002a /build.gradle | |
parent | 5676918bf471bd2714fe8f225b09a79ee5849489 (diff) | |
download | debian-packages-30471be35c083cd37dcad2afb2acdd2a2908f864.tar.gz debian-packages-30471be35c083cd37dcad2afb2acdd2a2908f864.zip |
repository rebuild in separate command
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/build.gradle b/build.gradle index 1d69d90..816e98a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,31 +1,45 @@ plugins { id "nebula.ospackage" version "3.2.0" } + ext { sshKeyfile = new File(System.getProperty('user.home'), '.ssh/id_rsa') - sshKnownHosts =new File(System.getProperty('user.home'), '.ssh/known_hosts') + sshKnownHosts = new File(System.getProperty('user.home'), '.ssh/known_hosts') sshUser = 'yvesf' sshHost = 'xapek.org' sshTargetDir = 'public_html/public/debian/files' sshRebuildCommand = 'public_html/public/debian/rebuild.sh' } -subprojects { +allprojects { configurations { sshAntTask } + repositories { mavenCentral() } + dependencies { sshAntTask 'org.apache.ant:ant-jsch:1.9.2' } + ant.taskdef( name: 'scp', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', classpath: configurations.sshAntTask.asPath) - ant.taskdef( name: 'ssh', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.SSHExec', classpath: configurations.sshAntTask.asPath) +} +task rebuildRepositoryIndex() << { + ant.ssh(host: sshHost, + username: sshUser, + keyfile: file(sshKeyfile), + knownhosts: file(sshKnownHosts), + command: sshRebuildCommand, + verbose: true) +} + +subprojects { group 'org.xapek.yvesf.debian' version '1.0-SNAPSHOT' @@ -33,22 +47,11 @@ subprojects { def buildDeb = project.getTasks().getByName('buildDeb') task upload() << { - ant.scp( - file: new File(project.buildDir, "distributions/${buildDeb.assembleArchiveName()}"), + ant.scp(file: new File(project.buildDir, "distributions/${buildDeb.assembleArchiveName()}"), todir: "${sshUser}@${sshHost}:${sshTargetDir}", keyfile: file(sshKeyfile), knownhosts: file(sshKnownHosts), - verbose: true, - ) - ant.ssh( - host: sshHost, - username: sshUser, - keyfile: file(sshKeyfile), - knownhosts: file(sshKnownHosts), - command: sshRebuildCommand, - verbose: true, - - ) + verbose: true) } upload.dependsOn(buildDeb) -}
\ No newline at end of file +} |