Skip to content

Commit

Permalink
pycharm: add 10.13+ requirement and align livecheck (Homebrew#106604)
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed May 31, 2021
1 parent f58b4eb commit 8b2c1dc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Casks/pycharm.rb
Expand Up @@ -3,26 +3,30 @@

if Hardware::CPU.intel?
sha256 "549e5f5b75e702d9ca24e7c89dcff4df1eef27d454ed70f2d59a9f9fba676d37"

url "https://download.jetbrains.com/python/pycharm-professional-#{version.before_comma}.dmg"
else
sha256 "49cd1fa712996dfe728892a033c353eb5b21e5c63742778e54a41cea39aa1175"

url "https://download.jetbrains.com/python/pycharm-professional-#{version.before_comma}-aarch64.dmg"
end

name "PyCharm"
name "PyCharm Professional"
desc "IDE for professional Python development"
homepage "https://www.jetbrains.com/pycharm/"

livecheck do
url "https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=release"
strategy :page_match do |page|
version = page.match(/"version":"(\d+(?:\.\d+)*)/i)
build = page.match(/"build":"(\d+(?:\.\d+)*)/i)
"#{version[1]},#{build[1]}"
JSON.parse(page)["PCP"].map do |release|
"#{release["version"]},#{release["build"]}"
end
end
end

auto_updates true
depends_on macos: ">= :high_sierra"

app "PyCharm.app"

Expand Down

0 comments on commit 8b2c1dc

Please sign in to comment.