| plugins { |
| id 'publishing' |
| id "org.hidetake.ssh" |
| } |
| |
| configurations { |
| archives |
| updates |
| } |
| |
| dependencies { |
| archives project(path: ':plugins:org.eclipse.etrice.generator.c', configuration: 'archive') |
| archives project(path: ':plugins:org.eclipse.etrice.generator.cpp', configuration: 'archive') |
| archives project(path: ':plugins:org.eclipse.etrice.generator.java', configuration: 'archive') |
| archives project(path: ':plugins:org.eclipse.etrice.generator.doc', configuration: 'archive') |
| archives project(path: ':releng:org.eclipse.etrice.site', configuration: 'archive') |
| |
| updates project(path: ':releng:org.eclipse.etrice.site', configuration: 'update') |
| } |
| |
| def versionDir = scmVersion.version.endsWith('SNAPSHOT') ? 'nightly' : scmVersion.version |
| def downloadDir = '/home/data/httpd/download.eclipse.org/etrice' |
| def promoteDir = "$downloadDir/$versionDir" |
| def assembleDir = "$buildDir/$versionDir" |
| |
| remotes { |
| projectsStorage { |
| host = 'projects-storage.eclipse.org' |
| user = 'genie.etrice' |
| } |
| } |
| |
| ssh.settings { |
| agent = true |
| fileTransfer = 'scp' |
| } |
| |
| task assembleArtifacts(type: Sync) { |
| into assembleDir |
| from(configurations.archives) { |
| into 'archives' |
| } |
| from(configurations.updates) { |
| into 'updates' |
| } |
| } |
| assemble.dependsOn assembleArtifacts |
| |
| task promote(dependsOn: assembleArtifacts) { |
| doLast { |
| ssh.run { |
| session(remotes.projectsStorage) { |
| logger.info "clean download area" |
| remove promoteDir |
| logger.info "promote artifacts" |
| put from: assembleDir, into: downloadDir |
| } |
| } |
| } |
| } |
| publish.dependsOn promote |