Closed zhoujian-official closed 2 years ago
Would you like to open a PR for this? Something like this should work:
diff --git a/Casks/springtoolsuite.rb b/Casks/springtoolsuite.rb
index da4c0f401a..fa726c3e2b 100644
--- a/Casks/springtoolsuite.rb
+++ b/Casks/springtoolsuite.rb
@@ -1,8 +1,14 @@
cask "springtoolsuite" do
+ arch = Hardware::CPU.intel? ? "x86_64" : "aarch64"
version "4.13.0,4.22.0"
- sha256 "ab25a0837de367605b3445fc358939bba1ba21408eb43cf8acccb8e7eb628be1"
- 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.x86_64.dmg",
+ if Hardware::CPU.intel?
+ sha256 "ab25a0837de367605b3445fc358939bba1ba21408eb43cf8acccb8e7eb628be1"
+ else
+ sha256 "aarch64 dmg checksum here"
+ end
+
+ 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",
verified: "download.springsource.com/release/"
name "Spring Tool Suite"
desc "Next generation tooling for Spring Boot"
You'll need to fill in the checksum correctly, of course.
As pointed out by @carlocab, please submit a pull request to add the Arm version to this Cask, thanks.
For what is worth, the sha256 when running on Terminal:
shasum -a 256 spring-tool-suite-4-4.13.1.RELEASE-e4.22.0-macosx.cocoa.aarch64.dmg
is:
704b71d6e41a1fc5ae2bdca416e980de010c0a4fa94002f1df2c65ac6ef0345c spring-tool-suite-4-4.13.1.RELEASE-e4.22.0-macosx.cocoa.aarch64.dmg
Verification
--force
.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
springtoolsuite
has separate versions of x86_64 and aarch64 for macOS, but the brew cask only downloads the x86_64 version. Please download springtoolsuite aarch version on MacBook M1, thanks.Command that failed
brew install springtoolsuite
Output of command with
--verbose --debug
Output of
brew doctor --verbose
Output of
brew tap