|
1 | 1 | cask "notesnook" do |
2 | | - arch arm: "arm64", intel: "x64" |
| 2 | + arch arm: "arm64", intel: on_system_conditional(macos: "x64", linux: "x86_64") |
| 3 | + os macos: "mac", linux: "linux" |
| 4 | + url_end = on_system_conditional macos: "dmg", linux: "AppImage" |
| 5 | + livecheck_folder = on_system_conditional macos: "darwin", linux: "linux" |
3 | 6 |
|
4 | 7 | version "3.4.8" |
5 | | - sha256 arm: "94f23dc0423303f0e48c148a03f12793745d1be9f0f7011b632ce6a7bc900f2d", |
6 | | - intel: "5f1a2de29fc5e01f68c98335be34541b7dc2478a09272d1f35917915fa9e177c" |
| 8 | + sha256 arm: "94f23dc0423303f0e48c148a03f12793745d1be9f0f7011b632ce6a7bc900f2d", |
| 9 | + intel: "5f1a2de29fc5e01f68c98335be34541b7dc2478a09272d1f35917915fa9e177c", |
| 10 | + arm64_linux: "6ea076415b1ea4ccb30ce435a4e65793aa77470aa498df0f9e1caf94c1898592", |
| 11 | + x86_64_linux: "980b4685800f5cf19e99a45429f363bd8d8b466d10ba965e9c10dc941bf4ddb3" |
7 | 12 |
|
8 | | - url "https://github.com/streetwriters/notesnook/releases/download/v#{version}/notesnook_mac_#{arch}.dmg" |
| 13 | + on_macos do |
| 14 | + app "Notesnook.app" |
| 15 | + |
| 16 | + zap trash: [ |
| 17 | + "~/Library/Application Support/Notesnook", |
| 18 | + "~/Library/Logs/Notesnook", |
| 19 | + "~/Library/Preferences/com.streetwriters.notesnook.plist", |
| 20 | + ] |
| 21 | + end |
| 22 | + on_linux do |
| 23 | + app_image "notesnook_linux_#{arch}.AppImage", target: "Notesnook.AppImage" |
| 24 | + |
| 25 | + zap trash: [ |
| 26 | + "~/.cache/@notesnookdesktop-updater", |
| 27 | + "~/.cache/notesnook", |
| 28 | + "~/.config/autostart/notesnook.desktop", |
| 29 | + "~/.config/Notesnook", |
| 30 | + ] |
| 31 | + end |
| 32 | + |
| 33 | + url "https://github.com/streetwriters/notesnook/releases/download/v#{version}/notesnook_#{os}_#{arch}.#{url_end}" |
9 | 34 | name "Notesnook" |
10 | 35 | desc "Privacy-focused note taking app" |
11 | 36 | homepage "https://notesnook.com/" |
12 | 37 |
|
13 | 38 | livecheck do |
14 | | - url "https://notesnook.com/api/v1/releases/darwin/latest/latest-mac.yml" |
| 39 | + url "https://notesnook.com/api/v1/releases/#{livecheck_folder}/latest/latest-#{os}.yml" |
15 | 40 | strategy :electron_builder |
16 | 41 | end |
17 | 42 |
|
18 | 43 | auto_updates true |
19 | | - depends_on :macos |
20 | | - |
21 | | - app "Notesnook.app" |
22 | | - |
23 | | - zap trash: [ |
24 | | - "~/Library/Application Support/Notesnook", |
25 | | - "~/Library/Logs/Notesnook", |
26 | | - "~/Library/Preferences/com.streetwriters.notesnook.plist", |
27 | | - ] |
28 | 44 | end |
0 commit comments