diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index ca85d8e..c4fd697 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -74,7 +74,6 @@ jobs: run: mvn -B clean package -DskipTests - name: Patch target dir run: | - cp LICENSE.txt target cp target/cryptomator-*.jar target/mods - name: Run jlink run: | @@ -88,6 +87,10 @@ jobs: JP_APP_VERSION: ${{ needs.prepare.outputs.semVerNum }} APP_VERSION: ${{ needs.prepare.outputs.semVerStr }} NATIVE_ACCESS_PACKAGE: ${{ matrix.native-access-lib }} + - name: Update app dir + run: | + cp LICENSE.txt target/cryptomator-cli + cp target/cryptomator-cli_completion.sh target/cryptomator-cli - uses: actions/upload-artifact@v4 with: name: cryptomator-cli-linux-${{ matrix.architecture }} diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index 1aa2825..1f76db3 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -84,7 +84,6 @@ jobs: run: mvn -B clean package -DskipTests - name: Patch target dir run: | - cp LICENSE.txt target cp target/cryptomator-*.jar target/mods - name: Run jlink run: | @@ -100,6 +99,8 @@ jobs: NATIVE_ACCESS_PACKAGE: org.cryptomator.jfuse.mac - name: Patch .app dir run: | + cp LICENSE.txt target/cryptomator-cli.app + cp target/cryptomator-cli_completion.sh target/cryptomator-cli.app sed -i '' "s|###BUNDLE_SHORT_VERSION_STRING###|${VERSION_NO}|g" cryptomator-cli.app/Contents/Info.plist sed -i '' "s|###BUNDLE_VERSION###|${REVISION_NO}|g" cryptomator-cli.app/Contents/Info.plist echo -n "$PROVISIONING_PROFILE_BASE64" | base64 --decode -o "cryptomator-cli.app/Contents/embedded.provisionprofile" diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index febbdfe..e6fa55f 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -78,6 +78,10 @@ jobs: JP_APP_VERSION: ${{ needs.prepare.outputs.semVerNum }} APP_VERSION: ${{ needs.prepare.outputs.semVerStr }} NATIVE_ACCESS_PACKAGE: org.cryptomator.jfuse.win + - name: Update app dir + run: | + cp LICENSE.txt target/cryptomator-cli + cp target/cryptomator-cli_completion.sh target/cryptomator-cli - name: Fix permissions run: attrib -r target/cryptomator-cli/cryptomator-cli.exe shell: pwsh diff --git a/pom.xml b/pom.xml index f1b4513..77cda8a 100644 --- a/pom.xml +++ b/pom.xml @@ -173,6 +173,33 @@ + + org.codehaus.mojo + exec-maven-plugin + ${maven-exec.version} + + + generate-autocompletion-script + package + + exec + + + + + java + + -Dpicocli.autocomplete.systemExitOnError + -cp + + picocli.AutoComplete + --force + --completionScript + ${project.build.directory}/cryptomator-cli_completion.sh + ${mainClass} + + +