diff --git a/.github/workflows/PUBLISH_SNAPSHOT.yml b/.github/workflows/PUBLISH_SNAPSHOT.yml index 55a81092..12a8f9c6 100644 --- a/.github/workflows/PUBLISH_SNAPSHOT.yml +++ b/.github/workflows/PUBLISH_SNAPSHOT.yml @@ -42,13 +42,13 @@ jobs: - name: test run: | pwd - cd empty_project && pwd + mkdir empty && cd empty && pwd pwd - name: Generate wrappers run: | mkdir empty_voodoo_project java -jar voodoo/build/libs/voodoo-${{ env.VERSION }}-all.jar --rootDir empty_voodoo_project generateWrapper - zip -r ../empty_voodoo_project.zip ./empty_voodoo_project + zip -r empty_voodoo_project.zip ./empty_voodoo_project - name: Create prerelease uses: meeDamian/github-release@2.0 with: diff --git a/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt b/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt index 3b385155..514a08d5 100644 --- a/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt +++ b/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt @@ -9,6 +9,7 @@ import mu.withLoggingContext import voodoo.util.maven.MavenUtil import voodoo.voodoo.GeneratedConstants import java.io.File +import java.io.StringWriter import java.util.* class GenerateWrapperCommand : CliktCommand( @@ -47,13 +48,13 @@ class GenerateWrapperCommand : CliktCommand( prop["distributionUrl"] = "${GeneratedConstants.MAVEN_URL}/$groupPath/voodoo/$version/voodoo-$version-${GeneratedConstants.MAVEN_SHADOW_CLASSIFIER}.jar" prop["distributionPath"] = "wrapper/bin" } - propertiesFile.createNewFile() - propertiesFile.writer().use { -// properties.store(it, "generated at ${DateTimeFormatter.ISO_INSTANT.format(Instant.now())}") + + StringWriter().use { properties.store(it, "generated by: voodoo generateWrapper") + propertiesFile.writeText(it.toString()) } - //TODO: generate shellscripts + // generate shellscripts rootDir.resolve("voodoo.bat").let { batFile -> if(batFile.exists()) {