@@ -239,6 +239,7 @@ task dockerPack(type: Exec, dependsOn: ['packOne']) {
239239task release (type : Exec , dependsOn : [pack, dockerImage, validatePluginVersions]) {
240240
241241 def launcherFile = file(' nextflow' ). absoluteFile
242+ def launcherMd5 = file(' nextflow.md5' ). absoluteFile
242243 def launcherSha1 = file(' nextflow.sha1' ). absoluteFile
243244 def launcherSha256 = file(' nextflow.sha256' ). absoluteFile
244245 def nextflowAllFile = file(" $releaseDir /nextflow-${ version} -dist" )
@@ -247,6 +248,7 @@ task release(type: Exec, dependsOn: [pack, dockerImage, validatePluginVersions])
247248 def snapshot = version ==~ / ^.+(-RC\d +|-SNAPSHOT)$/
248249 def edge = version ==~ / ^.+(-edge|-EDGE)$/
249250 def isLatest = ! snapshot && ! edge
251+ def branch = gitBranch()
250252 def cmd = """ \
251253 # tag the release
252254 git push || exit \$ ?
@@ -257,27 +259,27 @@ task release(type: Exec, dependsOn: [pack, dockerImage, validatePluginVersions])
257259 gh release upload --repo nextflow-io/nextflow v$version ${ launcherFile} ${ nextflowAllFile}
258260 """ . stripIndent()
259261
260- if ( edge )
262+ if ( edge && branch == ' master ' )
261263 cmd + = """
262264 # publish the script as the latest
263265 export AWS_ACCESS_KEY_ID=${ System.env.NXF_AWS_ACCESS}
264266 export AWS_SECRET_ACCESS_KEY=${ System.env.NXF_AWS_SECRET}
265267 aws s3 cp $launcherFile s3://www2.nextflow.io/releases/edge/nextflow $s3CmdOpts
266268 aws s3 cp $launcherSha1 s3://www2.nextflow.io/releases/edge/nextflow.sha1 $s3CmdOpts
267269 aws s3 cp $launcherSha256 s3://www2.nextflow.io/releases/edge/nextflow.sha256 $s3CmdOpts
268- aws s3 cp $l auncherSha256 s3://www2.nextflow.io/releases/edge/nextflow.md5 $s3CmdOpts
270+ aws s3 cp $l auncherMd5 s3://www2.nextflow.io/releases/edge/nextflow.md5 $s3CmdOpts
269271 aws s3 cp $versionFile s3://www2.nextflow.io/releases/edge/version $s3CmdOpts
270272 """ . stripIndent()
271-
272- else if ( isLatest )
273+
274+ else if ( isLatest && branch == ' master ' )
273275 cmd + = """
274276 # publish the script as the latest
275277 export AWS_ACCESS_KEY_ID=${ System.env.NXF_AWS_ACCESS}
276278 export AWS_SECRET_ACCESS_KEY=${ System.env.NXF_AWS_SECRET}
277279 aws s3 cp $launcherFile s3://www2.nextflow.io/releases/latest/nextflow $s3CmdOpts
278280 aws s3 cp $launcherSha1 s3://www2.nextflow.io/releases/latest/nextflow.sha1 $s3CmdOpts
279281 aws s3 cp $launcherSha256 s3://www2.nextflow.io/releases/latest/nextflow.sha256 $s3CmdOpts
280- aws s3 cp $l auncherSha256 s3://www2.nextflow.io/releases/latest/nextflow.md5 $s3CmdOpts
282+ aws s3 cp $l auncherMd5 s3://www2.nextflow.io/releases/latest/nextflow.md5 $s3CmdOpts
281283 aws s3 cp $versionFile s3://www2.nextflow.io/releases/latest/version $s3CmdOpts
282284 """ . stripIndent()
283285
0 commit comments