excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / font / font-d / font-d2coding.rb
blob3d5e46c81e229b4f6fc7cfa1087d21e18534b950
1 cask "font-d2coding" do
2   version "1.3.2,20180524"
3   sha256 "0f1c9192eac7d56329dddc620f9f1666b707e9c8ed38fe1f988d0ae3e30b24e6"
5   url "https://github.com/naver/d2codingfont/releases/download/VER#{version.csv.first}/D2Coding-Ver#{version.csv.first}#{"-#{version.csv.second}" if version.csv.second}.zip"
6   name "D2 Coding"
7   homepage "https://github.com/naver/d2codingfont"
9   livecheck do
10     url :url
11     regex(/D2Coding[._-](?:Ver|v)?v?(\d+(?:\.\d+)+)(?:-(v?(\d+(?:\.\d+)*)))?\.zip/i)
12     strategy :github_latest do |json, regex|
13       json["assets"]&.map do |asset|
14         match = asset["name"]&.match(regex)
15         next if match.blank?
17         match[2] ? "#{match[1]},#{match[2]}" : match[1]
18       end
19     end
20   end
22   font "D2Coding/D2Coding-Ver#{version.before_comma}-#{version.after_comma}.ttc"
24   # No zap stanza required
25 end