diff --git a/build.gradle b/build.gradle index 5cfa4f790a..46b381b7d7 100644 --- a/build.gradle +++ b/build.gradle @@ -270,7 +270,17 @@ ext.deployable << project(':nf-google') protected error(String message) { logger.error message - throw new StopExecutionException() + throw new StopExecutionException(message) +} + +protected checkVersionExits(String version) { + if(version.endsWith('-SNAPSHOT')) + return + + def cmd = "AWS_ACCESS_KEY_ID=${System.env.NXF_AWS_ACCESS} AWS_SECRET_ACCESS_KEY=${System.env.NXF_AWS_SECRET} aws s3 ls s3://www2.nextflow.io/releases/v$version/nextflow" + def status=['bash','-c', cmd].execute().waitFor() + if( status == 0 ) + error("STOP!! Version $version already deployed!") } protected resolveDeps( String configName, String... x ) { @@ -422,6 +432,8 @@ task deploy( type: Exec, dependsOn: [clean, compile, pack, deployable.uploadArch def files = [] doFirst { + checkVersionExits(version) + def path = new File(releaseDir) if( !path.exists() ) error("Releases path does not exists: $path") path.eachFile { diff --git a/modules/nextflow/src/main/groovy/nextflow/Const.groovy b/modules/nextflow/src/main/groovy/nextflow/Const.groovy index d617755d9e..fd6285bf35 100644 --- a/modules/nextflow/src/main/groovy/nextflow/Const.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/Const.groovy @@ -52,17 +52,17 @@ class Const { /** * The application version */ - static public final String APP_VER = "19.06.0-edge" + static public final String APP_VER = "19.07.0-edge" /** * The app build time as linux/unix timestamp */ - static public final long APP_TIMESTAMP = 1561123420338 + static public final long APP_TIMESTAMP = 1562672809328 /** * The app build number */ - static public final int APP_BUILDNUM = 5099 + static public final int APP_BUILDNUM = 5103 /**