build: Add task for bundle uploading

This commit is contained in:
Ilya Matveev
2017-12-20 20:29:03 +07:00
committed by ilmat192
parent 0fc1fb27e1
commit 68e54c5bb7
2 changed files with 35 additions and 2 deletions
+5 -2
View File
@@ -32,8 +32,11 @@ We usually mark 0.X releases as pre-releases.
### Upload builds ###
Upload build to CDN at upload.cds.intellij.net/kotlin/native.
Bundles are available at http://download.jetbrains.com/kotlin/native/<build>
Upload build to CDN at upload.cds.intellij.net/builds/releases/<version>/<macos|linux|windows>:
CDN_USER=... CDN_PASS=... ./gradlew :uploadBundle
Bundles are available at http://download.jetbrains.com/kotlin/native/releases/<version>/<platform>/<build>
in few minutes after upload.
Upload Gradle plugin to BinTray
+30
View File
@@ -361,6 +361,14 @@ task crossDist {
dependsOn 'crossDistRuntime', 'distCompiler'
}
configurations {
ftpAntTask
}
dependencies {
ftpAntTask 'org.apache.ant:ant-commons-net:1.9.9'
}
task bundle(type: (isWindows()) ? Zip : Tar) {
dependsOn('crossDistPlatformLibs')
dependsOn('crossDist')
@@ -410,6 +418,28 @@ task bundle(type: (isWindows()) ? Zip : Tar) {
}
}
task uploadBundle {
dependsOn ':bundle'
doLast {
def kind = konanVersion.contains("dev") ? "dev" : "releases"
def ftpSettings = [
server: "upload.cds.intellij.net",
userid: project.findProperty("cdnUser") ?: System.getenv("CDN_USER"),
password: project.findProperty("cdnPass") ?: System.getenv("CDN_PASS"),
remoteDir: "/builds/$kind/$konanVersion/${TargetManager.simpleOsName()}"
]
ant {
taskdef(name: 'ftp',
classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
classpath: configurations.ftpAntTask.asPath)
ftp([action: "mkdir"] + ftpSettings)
ftp(ftpSettings) {
fileset(file: bundle.archivePath)
}
}
}
}
task performance(type: GradleBuild) {
dependsOn 'dist'
dependsOn ':tools:kotlin-native-gradle-plugin:jar'