Skip to content

Commit 76a8d15

Browse files
committed
Merge branch 'release/1.2.0'
2 parents 5e08ae7 + aff6c73 commit 76a8d15

19 files changed

+114
-25
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
runs-on: macos-latest
88
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-java@v2
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-java@v3
1212
with:
1313
distribution: 'temurin'
1414
java-version: 17
@@ -21,16 +21,14 @@ jobs:
2121
- name: Build and Test
2222
id: buildAndTest
2323
run: mvn -B clean install -Pdependency-check
24-
- uses: actions/upload-artifact@v2
24+
- uses: actions/upload-artifact@v3
2525
with:
2626
name: artifacts
2727
path: target/*.jar
2828
- name: Create Release
29-
uses: actions/create-release@v1
29+
uses: softprops/action-gh-release@v1
3030
if: startsWith(github.ref, 'refs/tags/')
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
3331
with:
34-
tag_name: ${{ github.ref }}
35-
release_name: Release ${{ github.ref }}
3632
prerelease: true
33+
token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
34+
generate_release_notes: true

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
runs-on: macos-latest
1616
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
with:
2020
fetch-depth: 2
21-
- uses: actions/setup-java@v2
21+
- uses: actions/setup-java@v3
2222
with:
2323
distribution: 'temurin'
2424
java-version: 17
2525
cache: 'maven'
2626
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v1
27+
uses: github/codeql-action/init@v2
2828
with:
2929
languages: java
3030
- name: Build
3131
run: mvn -B compile
3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@v1
33+
uses: github/codeql-action/analyze@v2

.github/workflows/publish-central.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
publish:
1111
runs-on: macos-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
with:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
16-
- uses: actions/setup-java@v2
16+
- uses: actions/setup-java@v3
1717
with:
1818
distribution: 'temurin'
1919
java-version: 17

.github/workflows/publish-github.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
runs-on: macos-latest
88
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-java@v2
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-java@v3
1212
with:
1313
distribution: 'temurin'
1414
java-version: 17

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ macOS-specific implementations of [integrations-api](https://github.com/cryptoma
66

77
Since this project involves JNI, you'll Java as well as Xcode build tools:
88

9-
* JDK 11
9+
* JDK 17
1010
* Maven
1111
* XCode Command Line Tools (run `xcode-select --install`)

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>integrations-mac</artifactId>
8-
<version>1.1.2</version>
8+
<version>1.2.0</version>
99

1010
<name>Cryptomator Integrations for macOS</name>
1111
<description>Provides optional macOS services used by Cryptomator</description>
@@ -30,7 +30,7 @@
3030
<project.jdk.version>17</project.jdk.version>
3131

3232
<!-- runtime dependencies -->
33-
<api.version>1.1.0</api.version>
33+
<api.version>1.2.0-beta4</api.version>
3434
<slf4j.version>1.7.36</slf4j.version>
3535

3636
<!-- test dependencies -->

src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import org.cryptomator.integrations.autostart.AutoStartProvider;
22
import org.cryptomator.integrations.keychain.KeychainAccessProvider;
3+
import org.cryptomator.integrations.revealpath.RevealPathService;
34
import org.cryptomator.integrations.tray.TrayIntegrationProvider;
45
import org.cryptomator.integrations.uiappearance.UiAppearanceProvider;
56
import org.cryptomator.macos.autostart.MacAutoStartProvider;
67
import org.cryptomator.macos.keychain.MacSystemKeychainAccess;
8+
import org.cryptomator.macos.revealpath.OpenCmdRevealPathService;
79
import org.cryptomator.macos.tray.MacTrayIntegrationProvider;
810
import org.cryptomator.macos.uiappearance.MacUiAppearanceProvider;
911

@@ -13,6 +15,7 @@
1315

1416
provides AutoStartProvider with MacAutoStartProvider;
1517
provides KeychainAccessProvider with MacSystemKeychainAccess;
18+
provides RevealPathService with OpenCmdRevealPathService;
1619
provides TrayIntegrationProvider with MacTrayIntegrationProvider;
1720
provides UiAppearanceProvider with MacUiAppearanceProvider;
1821
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package org.cryptomator.macos.revealpath;
2+
3+
import org.cryptomator.integrations.common.OperatingSystem;
4+
import org.cryptomator.integrations.common.Priority;
5+
import org.cryptomator.integrations.revealpath.RevealFailedException;
6+
import org.cryptomator.integrations.revealpath.RevealPathService;
7+
8+
import java.io.IOException;
9+
import java.nio.file.Files;
10+
import java.nio.file.LinkOption;
11+
import java.nio.file.Path;
12+
import java.nio.file.attribute.BasicFileAttributes;
13+
import java.util.concurrent.TimeUnit;
14+
import java.util.stream.Collectors;
15+
16+
@Priority(100)
17+
@OperatingSystem(OperatingSystem.Value.MAC)
18+
public class OpenCmdRevealPathService implements RevealPathService {
19+
20+
@Override
21+
public void reveal(Path p) throws RevealFailedException {
22+
try {
23+
var attrs = Files.readAttributes(p, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS);
24+
ProcessBuilder pb = new ProcessBuilder().command("open", attrs.isDirectory() ? "" : "-R", p.toString());
25+
var process = pb.start();
26+
try (var reader = process.errorReader()) {
27+
if (process.waitFor(5000, TimeUnit.MILLISECONDS)) {
28+
int exitValue = process.exitValue();
29+
if (process.exitValue() != 0) {
30+
String error = reader.lines().collect(Collectors.joining());
31+
throw new RevealFailedException("open command exited with value " + exitValue + " and error message: " + error);
32+
}
33+
}
34+
}
35+
} catch (IOException e) {
36+
throw new RevealFailedException(e);
37+
} catch (InterruptedException e) {
38+
Thread.currentThread().interrupt();
39+
throw new RevealFailedException(e);
40+
}
41+
}
42+
43+
@Override
44+
public boolean isSupported() {
45+
return true;
46+
}
47+
48+
}

src/main/native/Integrations.xcodeproj/project.pbxproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
CLANG_WARN_SUSPICIOUS_MOVE = YES;
178178
CLANG_WARN_UNREACHABLE_CODE = YES;
179179
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
180-
CODE_SIGN_IDENTITY = "";
181180
COPY_PHASE_STRIP = NO;
182181
DEBUG_INFORMATION_FORMAT = dwarf;
183182
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -198,7 +197,7 @@
198197
GCC_WARN_UNUSED_FUNCTION = YES;
199198
GCC_WARN_UNUSED_VARIABLE = YES;
200199
HEADER_SEARCH_PATHS = "$(JAVA_HOME)/include/**";
201-
JAVA_HOME = "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home";
200+
JAVA_HOME = "$(HOME)/.sdkman/candidates/java/current";
202201
MACOSX_DEPLOYMENT_TARGET = 10.11;
203202
MTL_ENABLE_DEBUG_INFO = YES;
204203
ONLY_ACTIVE_ARCH = YES;
@@ -236,7 +235,6 @@
236235
CLANG_WARN_SUSPICIOUS_MOVE = YES;
237236
CLANG_WARN_UNREACHABLE_CODE = YES;
238237
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
239-
CODE_SIGN_IDENTITY = "";
240238
COPY_PHASE_STRIP = NO;
241239
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
242240
ENABLE_NS_ASSERTIONS = NO;
@@ -251,7 +249,7 @@
251249
GCC_WARN_UNUSED_FUNCTION = YES;
252250
GCC_WARN_UNUSED_VARIABLE = YES;
253251
HEADER_SEARCH_PATHS = "$(JAVA_HOME)/include/**";
254-
JAVA_HOME = "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home";
252+
JAVA_HOME = "$(HOME)/.sdkman/candidates/java/current";
255253
MACOSX_DEPLOYMENT_TARGET = 10.11;
256254
MTL_ENABLE_DEBUG_INFO = NO;
257255
SDKROOT = macosx;

src/main/resources/MacIntegrationsBundle_be.properties

Whitespace-only changes.

0 commit comments

Comments
 (0)