From 908d029b22ce80f6fb044a4e67b6361489c91bea Mon Sep 17 00:00:00 2001 From: nikky Date: Tue, 12 Jan 2021 01:51:34 +0100 Subject: [PATCH] hopefully this fixes the weird directory error --- .github/workflows/PUBLISH_SNAPSHOT.yml | 12 ++++++------ .../main/kotlin/voodoo/cli/GenerateWrapperCommand.kt | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/PUBLISH_SNAPSHOT.yml b/.github/workflows/PUBLISH_SNAPSHOT.yml index 234ca0d9..55a81092 100644 --- a/.github/workflows/PUBLISH_SNAPSHOT.yml +++ b/.github/workflows/PUBLISH_SNAPSHOT.yml @@ -39,16 +39,16 @@ jobs: echo "BRANCH=${{ env.BRANCH }}" echo "VERSION=${{ env.VERSION }}" echo "RELEASE_TAG=${{ env.RELEASE_TAG }}" - - name: Generate wrappers - run: | - mkdir empty_project - java -jar voodoo/build/libs/voodoo-${{ env.VERSION }}-all.jar --rootDir empty_project generateWrapper - cd empty_project && zip -r ../empty_project.zip ./* - name: test run: | pwd cd empty_project && 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 - name: Create prerelease uses: meeDamian/github-release@2.0 with: @@ -64,4 +64,4 @@ jobs: voodoo-${{ env.VERSION }}.jar:voodoo/build/libs/voodoo-${{ env.VERSION }}-all.jar multimc-installer-${{ env.VERSION }}.jar:multimc/installer/build/libs/multimc-installer-${{ env.VERSION }}-all.jar server-installer-${{ env.VERSION }}.jar:server-installer/build/libs/server-installer-${{ env.VERSION }}-all.jar - empty_project.zip:empty_project.zip \ No newline at end of file + empty_voodoo_project.zip:empty_voodoo_project.zip \ No newline at end of file diff --git a/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt b/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt index 38866897..3b385155 100644 --- a/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt +++ b/voodoo/src/main/kotlin/voodoo/cli/GenerateWrapperCommand.kt @@ -37,7 +37,8 @@ class GenerateWrapperCommand : CliktCommand( ) // create wrapper.properties - val propertiesFile = wrapperFile.resolve("../wrapper.properties") + val propertiesFile = rootDir.resolve("wrapper/wrapper.properties") + propertiesFile.absoluteFile.parentFile.mkdirs() val properties = Properties().also { prop -> val groupPath = GeneratedConstants.MAVEN_GROUP.replace('.','/') val version = if(GeneratedConstants.FULL_VERSION.endsWith("-local")) {