-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Linuxbrew #645
Comments
Sorry about the trouble here. We lost I'm not sure Linuxbrew will be easy for us to do at the moment given our current CI + goreleaser pipeline. Right now we have GitHub actions running and building the CLI on each operating system. The homebrew target only runs on Mac for the Mac builds. From how I understand goreleaser works, the homebrew recipe is generated based on the previously defined architecture and it completely squashes the prior homebrew recipe everytime we run a new release. So if we added brew to the Linux build it would squash the Mac build. We could combine some of the build pipelines but I'm worried about platform-specific bugs that could arise here, we've had problems with this in the past and had to add special workarounds to resolve these kinds of issues (see #439). We had to move off of all that though because they weren't keeping up with new Golang releases, which was also introducing problems. Anyway that's a slightly long winded reply. We'll definitely keep looking into this as we'd really want to make the install process on Linux much easier. |
I completely understand that viewpoint. If an effort is being put into making it easier to install on Linux, maybe Snap or Flatpak would be an option? |
I'm not really familiar with either, I'll look into those! |
I am running into a similar issue -- trying to install the CLI via homebrew but cannot due to "invalid syntax in tap." Why is this listed as an option in the documentation if it doesn't work? |
Also having this problem. Using Linux because I'm using WSL2 on Windows as my dev machine. |
Also having this problem on Linux. Currently running Ubuntu 21.04. |
FWIW it’s possible to generate Linux Homebrew formulæ using GoReleaser. I was able to successfully generate a valid Linux formula by simply copy/pasting the diff --git .goreleaser/linux.yml .goreleaser/linux.yml
index f7b503e..faf99b8 100644
--- .goreleaser/linux.yml
+++ .goreleaser/linux.yml
@@ -62,3 +62,28 @@ dockers:
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=repository=https://github.com/stripe/stripe-cli"
- "--label=homepage=https://stripe.com"
+brews:
+ - tap:
+ owner: stripe
+ name: homebrew-stripe-cli
+ commit_author:
+ name: stripe-ci
+ email: [email protected]
+ homepage: https://stripe.com
+ description: Stripe CLI utility
+ install: |
+ bin.install "stripe"
+ rm Dir["#{bin}/{stripe-completion.bash,stripe-completion.zsh}"]
+ system bin/"stripe", "completion", "--shell", "bash"
+ system bin/"stripe", "completion", "--shell", "zsh"
+ bash_completion.install "stripe-completion.bash"
+ zsh_completion.install "stripe-completion.zsh"
+ (zsh_completion/"_stripe").write <<~EOS
+ #compdef stripe
+ _stripe () {
+ local e
+ e=$(dirname ${funcsourcetrace[1]%:*})/stripe-completion.zsh
+ if [[ -f $e ]]; then source $e; fi
+ }
+ EOS
+ caveats: "❤ Thanks for installing the Stripe CLI! If this is your first time using the CLI, be sure to run `stripe login` first." Then: # --skip-publish --skip-validate to make it work in local even if v1.7.0 is not the latest commit
goreleaser release -f .goreleaser/linux.yml --skip-publish --skip-validate --rm-dist
# fix the checksum because the generated tarball is not exactly the same as the one published by Stripe
real_checksum=$(curl -Ls https://github.com/stripe/stripe-cli/releases/download/v1.7.0/stripe_1.7.0_linux_x86_64.tar.gz | shasum -a 256 | awk '{print $1}')
sed -i'' 's/sha256 ".*"/sha256 "'$real_checksum'"/' dist/stripe.rb
brew install ./dist/stripe.rb The code above is just a proof that adding that section in the GoReleaser file work; it shouldn’t be used as-is. That said, the current workflow runs a Edit: I wrote this formula: |
Just ran into this as well. It really should be removed from the docs until this is fixed. |
Have you done a PR for this? It looks simple enough at add Linux support. That's the whole point of Go. There's no way the Homebrew tap should have ever just been for macOS in the first place. That's just silly @tomer-stripe |
No, because while GoReleaser does support generating a formula for both Linux and macOS, this repo uses different GoReleaser workflows for each platform and I’m not sure how to merge them. |
please update your documentation, very poor. |
Still same problem, I do use brew for other stuff but still at least a linux no compatibility warning would be appreciated |
This issue remains unresolved, even after over 3 years (1,219 days exactly) It’s quite disappointing that the maintainers don't seem particularly interested in fixing this 😞 |
Problem
I am on a Linux machine right now and I would like to install Stripe CLI through a package manager so that I don't have to deal with updates myself, however it seems that the APT package that I was using is not available anymore. I was looking to use the Homebrew for Linux package instead, however it appears that it only supports Macs. From what I saw, it looks like it shouldn't be too difficult to add support for Linux.
If it is of any use, here is the output I get right now:
stripe/homebrew-stripe-cli#2
Feature
The addition of a Linux package to the Homebrew formula would allow this package to be installed on Linuxbrew. I'm not sure how this would fit in with your current release process. I did a little bit of digging and can see that Goreleaser is being used and that it sets an install section in the formula. Not entirely sure if it would break if the Linux workflow would break this if it were set there as well.
Examples
N/a. Just being able to install on Linux through Homebrew.
The text was updated successfully, but these errors were encountered: