Skip to content

Commit 68989e0

Browse files
committed
Merge branch 'develop' into release/0.6.0
2 parents 598331d + a32cdb2 commit 68989e0

File tree

9 files changed

+60
-19
lines changed

9 files changed

+60
-19
lines changed

.github/workflows/build-linux.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ on:
77
inputs:
88
sem-version:
99
description: 'Version'
10-
required: false
10+
required: true
1111

1212
permissions:
1313
contents: write
14-
packages: write
1514

1615
env:
1716
JAVA_DIST: 'zulu'
18-
JAVA_VERSION: '22.0.2+9'
17+
JAVA_VERSION: '23.0.1+11'
1918

2019
defaults:
2120
run:

.github/workflows/build-mac.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ on:
77
inputs:
88
sem-version:
99
description: 'Version'
10-
required: false
10+
required: true
1111
notarize:
1212
description: 'Notarize app'
1313
required: false
1414
type: boolean
1515

1616
permissions:
1717
contents: write
18-
packages: write
1918

2019
env:
2120
JAVA_DIST: 'zulu'
22-
JAVA_VERSION: '22.0.2+9'
21+
JAVA_VERSION: '23.0.1+11'
2322

2423
defaults:
2524
run:

.github/workflows/build-win.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ on:
77
inputs:
88
sem-version:
99
description: 'Version'
10-
required: false
10+
required: true
1111

1212
permissions:
1313
contents: write
14-
packages: write
1514

1615
env:
1716
JAVA_DIST: 'zulu'
18-
JAVA_VERSION: '22.0.2+9'
17+
JAVA_VERSION: '23.0.1+11'
1918

2019
defaults:
2120
run:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-java@v4
1717
with:
18-
java-version: '22'
18+
java-version: '23'
1919
distribution: 'temurin'
2020
- name: Ensure to use tagged version
2121
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags'

.github/workflows/post-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Post Release Publish Tasks
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
get-version:
16+
runs-on: ubuntu-latest
17+
env:
18+
ARCHIVE_NAME: cryptomator-cli-${{ github.event.release.tag_name }}.tar.gz
19+
steps:
20+
- name: Download source tarball
21+
run: |
22+
curl -L -H "Accept: application/vnd.github+json" https://github.com/cryptomator/cli/archive/refs/tags/${{ github.event.release.tag_name }}.tar.gz --output ${{ env.ARCHIVE_NAME }}
23+
- name: Sign source tarball with key 615D449FE6E6A235
24+
run: |
25+
echo "${GPG_PRIVATE_KEY}" | gpg --batch --quiet --import
26+
echo "${GPG_PASSPHRASE}" | gpg --batch --quiet --passphrase-fd 0 --pinentry-mode loopback -u 615D449FE6E6A235 --detach-sign -a ${{ env.ARCHIVE_NAME }}
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
29+
GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
30+
- name: Publish asc on GitHub Releases
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
fail_on_unmatched_files: true
34+
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
35+
files: |
36+
${{ env.ARCHIVE_NAME }}.asc

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14-
<jdk.version>22</jdk.version>
14+
<jdk.version>23</jdk.version>
1515

1616
<!--jpackage stuff -->
1717
<!-- Group IDs of jars that need to stay on the class path for now
@@ -20,7 +20,7 @@
2020
<mainClass>org.cryptomator.cli.CryptomatorCli</mainClass>
2121

2222
<!-- runtime dependencies -->
23-
<cryptofs.version>2.7.0</cryptofs.version>
23+
<cryptofs.version>2.7.1</cryptofs.version>
2424
<webdav-nio.version>2.0.7</webdav-nio.version>
2525
<fuse-nio.version>5.0.2</fuse-nio.version>
2626
<logback.version>1.5.12</logback.version>

src/main/java/org/cryptomator/cli/MountSetup.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void setMountService(String value) {
4848

4949
@CommandLine.Option(names = {"--loopbackHostName"}, description = "Name of the loopback address.")
5050
Optional<String> loopbackHostName;
51-
51+
5252
@CommandLine.Option(names = {"--loopbackPort"}, description = "Port used at the loopback address.")
5353
Optional<Integer> loopbackPort;
5454

@@ -92,7 +92,7 @@ MountBuilder prepareMountBuilder(FileSystem fs) {
9292
}
9393

9494
var ignoredMOPs = specifiedMOPs.entrySet().stream().filter(Map.Entry::getValue).map(e -> e.getKey().name()).collect(Collectors.joining(","));
95-
if(!ignoredMOPs.isEmpty()) {
95+
if (!ignoredMOPs.isEmpty()) {
9696
LOG.info("Ignoring unsupported options: {}", ignoredMOPs);
9797
}
9898
return builder;
@@ -111,10 +111,17 @@ private Map<MountCapability, Boolean> listSpecifiedMountOptions() {
111111

112112
Mount mount(FileSystem fs) throws MountFailedException {
113113
if (!mountService.hasCapability(MOUNT_TO_SYSTEM_CHOSEN_PATH) && mountPoint.isEmpty()) {
114-
throw new CommandLine.ParameterException(spec.commandLine(), "The selected mounter %s requires a mount point. Use --mountPoint /path/to/mount/point to specify it.".formatted(mountService.displayName()));
114+
throw new RuntimeException("Unsupported configuration: Mounter %s requires a mount point. Use --mountPoint /path/to/mount/point to specify it.".formatted(mountService.getClass().getName()));
115115
}
116+
116117
var builder = prepareMountBuilder(fs);
117-
mountPoint.ifPresent(builder::setMountpoint);
118+
119+
try {
120+
mountPoint.ifPresent(builder::setMountpoint);
121+
} catch (UnsupportedOperationException e) {
122+
var errorMessage = String.format("Unsupported configuration: Mounter '%s' does not support flag --mountpoint", mountService.getClass().getName());
123+
throw new RuntimeException(errorMessage);
124+
}
118125
LOG.debug("Mounting vault using {} to {}.", mountService.displayName(), mountPoint.isPresent() ? mountPoint.get() : "system chosen location");
119126
return builder.mount();
120127
}

src/main/java/org/cryptomator/cli/PasswordSource.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public class PasswordSource {
2828

2929
Passphrase readPassphrase() throws IOException {
3030
if (passphraseStdin != null) {
31-
return new Passphrase(passphraseStdin); //readPassphraseFromStdin();
31+
System.out.println("\n"); //otherwise other output might not be clearly separated on the console
32+
return new Passphrase(passphraseStdin);
3233
} else if (passphraseEnvironmentVariable != null) {
3334
return readPassphraseFromEnvironment();
3435
} else if (passphraseFile != null) {
@@ -60,7 +61,7 @@ private Passphrase readPassphraseFromFile() throws ReadingFileFailedException {
6061
charWrapper = StandardCharsets.UTF_8.decode(ByteBuffer.wrap(fileContent));
6162
//strips newline, since most files on linux end with a new line
6263
var length = charWrapper.limit();
63-
if(charWrapper.get(length) == '\n') {
64+
if(charWrapper.get(length - 1) == '\n') {
6465
length--;
6566
}
6667
char[] content = new char[length];

src/main/java/org/cryptomator/cli/Unlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public Integer call() throws Exception {
8484

8585
try (var fs = CryptoFileSystemProvider.newFileSystem(pathToVault, fsPropsBuilder.build());
8686
var mount = mountSetup.mount(fs)) {
87-
System.out.println(mount.getMountpoint().uri());
87+
LOG.info("Unlocked and mounted vault successfully to {}", mount.getMountpoint().uri());
8888
Runtime.getRuntime().addShutdownHook(new Thread(() -> teardown(mount)));
8989
Thread.currentThread().join();
9090
}

0 commit comments

Comments
 (0)