excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / s / springtoolsuite.rb
blobfd84576041358f8f8050ebca1803f454c609f5e6
1 cask "springtoolsuite" do
2   arch arm: "aarch64", intel: "x86_64"
4   version "4.26.0,4.33.0"
5   sha256 arm:   "7732b03ca83c92df2fdc5c1805e8b7295bd971b4fb5adfe5bc14bd8e1d013cce",
6          intel: "07b3a3f3f92f9541ab737caeb1dcb2fe48f9aafc0341e80c19e7a193a83b0a38"
8   url "https://download.springsource.com/release/STS#{version.major}/#{version.csv.first}.RELEASE/dist/e#{version.csv.second.major_minor}/spring-tool-suite-#{version.major}-#{version.csv.first}.RELEASE-e#{version.csv.second}-macosx.cocoa.#{arch}.dmg",
9       verified: "download.springsource.com/release/"
10   name "Spring Tool Suite"
11   desc "Next generation tooling for Spring Boot"
12   homepage "https://spring.io/tools/"
14   livecheck do
15     url :homepage
16     strategy :page_match do |page|
17       match = page.match(
18         %r{href=.*?/spring-tool-suite-\d+-(\d+(?:\.\d+)+)\.RELEASE-e(\d+(?:\.\d+)+)-macosx\.cocoa\.#{arch}\.dmg}i,
19       )
20       next if match.blank?
22       "#{match[1]},#{match[2]}"
23     end
24   end
26   auto_updates true
28   app "SpringToolSuite#{version.major}.app"
30   zap trash: [
31     "~/Library/Preferences/org.springframework.boot.ide.branding.sts#{version.major}.plist",
32     "~/Library/Saved Application State/org.springframework.boot.ide.branding.sts#{version.major}.savedState",
33   ]
34 end