Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Casks/p/paper-design.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cask "paper-design" do
version "0.1.11,260407lr7cv5171"
sha256 "2bc42752c1c4679f9c270213043f9dec6efb743ae2a0c7cdf82f901a4e81da42"

url "https://download.todesktop.com/2601167vjw8xe/Paper%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-arm64.dmg",
verified: "download.todesktop.com/2601167vjw8xe/"
name "Paper"
desc "Design tool for creating interfaces and prototypes"
homepage "https://paper.design/"

livecheck do
url "https://download.todesktop.com/2601167vjw8xe/latest-mac.yml"
regex(/Paper\s+(\d+(?:\.\d+)+)\s+-\s+Build\s+([a-z0-9]+)-arm64\.dmg/i)
Copy link
Copy Markdown
Member

@krehel krehel Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edit - covers in case upstream switches to common separators other than -

Suggested change
regex(/Paper\s+(\d+(?:\.\d+)+)\s+-\s+Build\s+([a-z0-9]+)-arm64\.dmg/i)
regex(/Paper\s+v?(\d+(?:\.\d+)+)\s+[._-]\s+Build\s+([a-z\d]+)[._-]arm64\.dmg/i)

strategy :electron_builder do |yaml, regex|
yaml["files"]&.map do |item|
match = item["url"]&.match(regex)
next if match.blank?

"#{match[1]},#{match[2]}"
end
end
end

auto_updates true
depends_on arch: :arm64
depends_on macos: ">= :monterey"

app "Paper.app"

uninstall quit: "com.todesktop.2601167vjw8xe"

zap trash: [
"~/Library/Application Support/Paper",
"~/Library/Preferences/com.todesktop.2601167vjw8xe.plist",
]
end
Loading