diff --git a/changelog/@unreleased/pr-1441.v2.yml b/changelog/@unreleased/pr-1441.v2.yml new file mode 100644 index 000000000..ac26e20ef --- /dev/null +++ b/changelog/@unreleased/pr-1441.v2.yml @@ -0,0 +1,6 @@ +type: improvement +improvement: + description: Moved the init and check scripts to a resource subdirectory less likely + to collide with other Gradle plugins. + links: + - https://github.com/palantir/sls-packaging/pull/1441 diff --git a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateCheckScript.java b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateCheckScript.java index b6592caf7..018245372 100644 --- a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateCheckScript.java +++ b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateCheckScript.java @@ -43,7 +43,7 @@ interface Params { static void action(Params params) { if (!params.getCheckArgs().get().isEmpty()) { EmitFiles.replaceVars( - JavaServiceDistributionPlugin.class.getResourceAsStream("/check.sh"), + JavaServiceDistributionPlugin.class.getResourceAsStream("/sls-packaging/check.sh"), params.getOutputFile().get().getAsFile().toPath(), ImmutableMap.of( "@serviceName@", params.getServiceName().get(), diff --git a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateInitScript.java b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateInitScript.java index 6747482d8..96d7f5150 100644 --- a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateInitScript.java +++ b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/CreateInitScript.java @@ -37,7 +37,7 @@ interface Params { static void action(Params params) { EmitFiles.replaceVars( - JavaServiceDistributionPlugin.class.getResourceAsStream("/init.sh"), + JavaServiceDistributionPlugin.class.getResourceAsStream("/sls-packaging/init.sh"), params.getOutputFile().get().getAsFile().toPath(), ImmutableMap.of("@serviceName@", params.getServiceName().get())) .toFile() diff --git a/gradle-sls-packaging/src/main/resources/check.sh b/gradle-sls-packaging/src/main/resources/sls-packaging/check.sh similarity index 100% rename from gradle-sls-packaging/src/main/resources/check.sh rename to gradle-sls-packaging/src/main/resources/sls-packaging/check.sh diff --git a/gradle-sls-packaging/src/main/resources/init.sh b/gradle-sls-packaging/src/main/resources/sls-packaging/init.sh similarity index 100% rename from gradle-sls-packaging/src/main/resources/init.sh rename to gradle-sls-packaging/src/main/resources/sls-packaging/init.sh