brianstrauch / spotify-cli

Spotify for the terminal
Apache License 2.0
317 stars 16 forks source link

Install with Homebrew #18

Closed brianstrauch closed 7 months ago

irateswami commented 3 years ago

Mind if I help? I've been meaning to learn how to do brew formulae

brianstrauch commented 3 years ago

@irateswami Sure, feel free!

irateswami commented 3 years ago

Awesome. Typically brew formulae are in a separate repo, I'll make one and add you as an admin on it.

TomTucka commented 3 years ago

any update on this? Setting up homebrew is super easy with goreleaser!

brianstrauch commented 3 years ago

I agree; @TomTucka would you like to take this issue? If not, I'll take a stab at it later today

irateswami commented 3 years ago

Busy week at work, here's what I have so far:

SPOTIFY_CLI_VERSION= "v1.8.0".freeze

class Spotifycli < Formula
  desc "A Spotify CLI"
  homepage "https://github.com/brianstrauch/spotify-cli"
  version "1.8.0"
  if OS.mac && Hardware::CPU.intel?
    sha256 ""
    url "https://github.com/brianstrauch/spotify-cli/releases/download/#{version}/spotify-cli_#{version}_darwin_amd64"
  elsif OS.mac && Hardware::CPU.arm?
    sha256 ""
    url "https://github.com/brianstrauch/spotify-cli/releases/download/#{version}/spotify-cli_#{version}_darwin_arm64"
  end

  def install
    if OS.mac?
      mv "spotify-cli_#{version}_darwin_amd64", "spotify-cli"
    elsif OS.linux?
      mv "spotify-cli_#{version}_linux_amd64", "spotify-cli"
    end
    bin.install "spotify-cli"
  end
  test do
    #system "#{bin}/dry", "--version"
  end
end
TomTucka commented 3 years ago

I agree; @TomTucka would you like to take this issue? If not, I'll take a stab at it later today

@brianstrauch Yep, I can update the goreleaser file later today.