diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 09d2a4c8759..bce3923af8e 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -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/ + Upload build to CDN at upload.cds.intellij.net/builds/releases//: + + CDN_USER=... CDN_PASS=... ./gradlew :uploadBundle + +Bundles are available at http://download.jetbrains.com/kotlin/native/releases/// in few minutes after upload. Upload Gradle plugin to BinTray diff --git a/build.gradle b/build.gradle index 555597f054c..8293eaa5650 100644 --- a/build.gradle +++ b/build.gradle @@ -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'