@@ -241,6 +241,7 @@ task dockerPack(type: Exec, dependsOn: ['packOne']) {
241241task release (type : Exec , dependsOn : [pack, dockerImage, validatePluginVersions]) {
242242
243243 def launcherFile = file(' nextflow' ). absoluteFile
244+ def launcherMd5 = file(' nextflow.md5' ). absoluteFile
244245 def launcherSha1 = file(' nextflow.sha1' ). absoluteFile
245246 def launcherSha256 = file(' nextflow.sha256' ). absoluteFile
246247 def nextflowAllFile = file(" $releaseDir /nextflow-${ version} -dist" )
@@ -249,6 +250,7 @@ task release(type: Exec, dependsOn: [pack, dockerImage, validatePluginVersions])
249250 def snapshot = version ==~ / ^.+(-RC\d +|-SNAPSHOT)$/
250251 def edge = version ==~ / ^.+(-edge|-EDGE)$/
251252 def isLatest = ! snapshot && ! edge
253+ def branch = gitBranch()
252254 def cmd = """ \
253255 # tag the release
254256 git push || exit \$ ?
@@ -259,27 +261,27 @@ task release(type: Exec, dependsOn: [pack, dockerImage, validatePluginVersions])
259261 gh release upload --repo nextflow-io/nextflow v$version ${ launcherFile} ${ nextflowAllFile}
260262 """ . stripIndent()
261263
262- if ( edge )
264+ if ( edge && branch == ' master ' )
263265 cmd + = """
264266 # publish the script as the latest
265267 export AWS_ACCESS_KEY_ID=${ System.env.NXF_AWS_ACCESS}
266268 export AWS_SECRET_ACCESS_KEY=${ System.env.NXF_AWS_SECRET}
267269 aws s3 cp $launcherFile s3://www2.nextflow.io/releases/edge/nextflow $s3CmdOpts
268270 aws s3 cp $launcherSha1 s3://www2.nextflow.io/releases/edge/nextflow.sha1 $s3CmdOpts
269271 aws s3 cp $launcherSha256 s3://www2.nextflow.io/releases/edge/nextflow.sha256 $s3CmdOpts
270- aws s3 cp $l auncherSha256 s3://www2.nextflow.io/releases/edge/nextflow.md5 $s3CmdOpts
272+ aws s3 cp $l auncherMd5 s3://www2.nextflow.io/releases/edge/nextflow.md5 $s3CmdOpts
271273 aws s3 cp $versionFile s3://www2.nextflow.io/releases/edge/version $s3CmdOpts
272274 """ . stripIndent()
273-
274- else if ( isLatest )
275+
276+ else if ( isLatest && branch == ' master ' )
275277 cmd + = """
276278 # publish the script as the latest
277279 export AWS_ACCESS_KEY_ID=${ System.env.NXF_AWS_ACCESS}
278280 export AWS_SECRET_ACCESS_KEY=${ System.env.NXF_AWS_SECRET}
279281 aws s3 cp $launcherFile s3://www2.nextflow.io/releases/latest/nextflow $s3CmdOpts
280282 aws s3 cp $launcherSha1 s3://www2.nextflow.io/releases/latest/nextflow.sha1 $s3CmdOpts
281283 aws s3 cp $launcherSha256 s3://www2.nextflow.io/releases/latest/nextflow.sha256 $s3CmdOpts
282- aws s3 cp $l auncherSha256 s3://www2.nextflow.io/releases/latest/nextflow.md5 $s3CmdOpts
284+ aws s3 cp $l auncherMd5 s3://www2.nextflow.io/releases/latest/nextflow.md5 $s3CmdOpts
283285 aws s3 cp $versionFile s3://www2.nextflow.io/releases/latest/version $s3CmdOpts
284286 """ . stripIndent()
285287
0 commit comments