Merge pull request #198803 from Homebrew/bump-wizcli-0.69.0
[Homebrew/homebrew-cask.git] / Casks / s / springtoolsuite.rb
blob2d771fc6e821b72f30dd954ff7249ca899749f20
1 cask "springtoolsuite" do
2   arch arm: "aarch64", intel: "x86_64"
4   version "4.27.0,4.34.0"
5   sha256 arm:   "1ead93dd6c1c3f4f7e3408ad591e276967c45029010eb2263535d0251c1f194a",
6          intel: "eb9527008dff28a35b9309a8055efa6a878be31f9b6be98c08b4e42771116c67"
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