diff --git a/README.md b/README.md index 50130f91af..3e015d07b9 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,10 @@ this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Insta ### MacOS -You can install the app using Homebrew: +You can install the app using Homebrew (see the [cask definition](https://github.com/th-ch/homebrew-youtube-music)): + ```bash -brew install --cask https://raw.githubusercontent.com/th-ch/youtube-music/master/youtube-music.rb +brew install th-ch/youtube-music/youtube-music ``` If you install the app manually and get an error "is damaged and can’t be opened." when launching the app, run the following in the Terminal: diff --git a/youtube-music.rb b/youtube-music.rb deleted file mode 100644 index 1981ec1c29..0000000000 --- a/youtube-music.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'json' -require 'net/http' - -cask "youtube-music" do - desc "YouTube Music Desktop App" - homepage "https://github.com/th-ch/youtube-music" - - # Fetch the latest release version from GitHub API - uri = URI("https://api.github.com/repos/th-ch/youtube-music/releases/latest") - response = Net::HTTP.get(uri) - latest_release = JSON.parse(response)['tag_name'] - version latest_release - - base_url = "https://github.com/th-ch/youtube-music/releases/download/#{latest_release}/YouTube-Music-#{latest_release.delete_prefix('v')}" - file_extension = Hardware::CPU.arm? ? "-arm64.dmg" : ".dmg" - url "#{base_url}#{file_extension}" - - # TODO checksum - sha256 :no_check - - app "YouTube Music.app" - - postflight do - print("Removing quarantine attribute from YouTube Music.app.\n") - system "xattr -cr '/Applications/YouTube Music.app'" - end - - auto_updates true -end