File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/groovy/to/wetransform/gradle/swarm Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ import to.wetransform.gradle.swarm.config.pebble.RootOrLocalMap
3737import to.wetransform.gradle.swarm.crypt.ConfigCryptor
3838import to.wetransform.gradle.swarm.crypt.SimpleConfigCryptor ;
3939import to.wetransform.gradle.swarm.crypt.alice.AliceCryptor ;
40- import to.wetransform.gradle.swarm.tasks.Assemble ;
40+ import to.wetransform.gradle.swarm.tasks.Assemble
41+
42+ import java.util.regex.Pattern ;
4143
4244class SwarmComposerPlugin implements Plugin<Project > {
4345
@@ -637,6 +639,10 @@ class SwarmComposerPlugin implements Plugin<Project> {
637639 // add a script file for convenient Docker Compose calls
638640 File scriptFile = project. file(composeSupported ? " ${ sc.stackName} -${ sc.setupName} .sh" : (scriptPerSetup ? " deploy-${ sc.stackName} -${ sc.setupName} .sh" : " deploy-${ sc.stackName} .sh" ))
639641 def relPath = project. projectDir. toPath(). relativize( composeFile. toPath() ). toFile(). toString()
642+ if (! scriptPerSetup) {
643+ // path to compose file must be generalized - can only work if setup name is generally part of the path, as it is the case for the default path
644+ relPath = relPath. replaceAll(Pattern . quote(sc. setupName), ' \\ $SETUP' )
645+ }
640646
641647 def run
642648 def check = ' '
You can’t perform that action at this time.
0 commit comments