spotify-cli icon indicating copy to clipboard operation
spotify-cli copied to clipboard

Install with Homebrew

Open brianstrauch opened this issue 3 years ago • 7 comments

brianstrauch avatar Jun 22 '21 01:06 brianstrauch

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

irateswami avatar Jun 27 '21 20:06 irateswami

@irateswami Sure, feel free!

brianstrauch avatar Jun 27 '21 21:06 brianstrauch

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

irateswami avatar Jun 27 '21 21:06 irateswami

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

TomTucka avatar Jul 05 '21 09:07 TomTucka

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

brianstrauch avatar Jul 05 '21 14:07 brianstrauch

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

irateswami avatar Jul 05 '21 15:07 irateswami

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.

TomTucka avatar Jul 05 '21 15:07 TomTucka