jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.41k stars 157 forks source link

Brew 0.83 Package is 0.82.1 Binary #1074

Closed murphye closed 2 years ago

murphye commented 2 years ago
➜  Desktop brew upgrade jbang
Warning: jbangdev/tap/jbang 0.83.0 already installed
➜  Desktop brew uninstall jbang      
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the weaveworks/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/weaveworks/homebrew-tap/Formula/eksctl.rb:9

Uninstalling /usr/local/Cellar/jbang/0.83.0... (8 files, 5.9MB)
➜  Desktop jbang
zsh: command not found: jbang
➜  Desktop brew install jbang        
==> Downloading https://github.com/jbangdev/jbang/releases/download/v0.83.0/jbang-0.83.0.zip
Already downloaded: /Users/eric.murphy/Library/Caches/Homebrew/downloads/ca9c7959cda0d6c50efd10175e7f7e014587965ff8fe73edb61eef11fe9e3c03--jbang-0.83.0.zip
==> Installing jbang from jbangdev/tap
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.0.

🍺  /usr/local/Cellar/jbang/0.83.0: 8 files, 5.9MB, built in 3 seconds
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the weaveworks/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/weaveworks/homebrew-tap/Formula/eksctl.rb:9

➜  Desktop jbang --version           
0.82.1

After upgrading, uninstalling and reinstalling, the binary is still 0.82.1 even though the package is /ca9c7959cda0d6c50efd10175e7f7e014587965ff8fe73edb61eef11fe9e3c03--jbang-0.83.0.zip

maxandersen commented 2 years ago

No, I cannot confirm that - if you download the zip brew downloads at https://github.com/jbangdev/jbang/releases/download/v0.83.0/jbang-0.83.0.zip you'll see that it says 0.83.0 in the version.txt.

My guess is that you have jbang installed somewhere earlier in the path which is a 0.82.1 ?

Try run where jbang and my guess is you have used curl (#1075) and its in ~/.jbang/bin.

Actually - whats weird is the ":unneeded is deprecated" - that was removed in 0.83.0 (https://github.com/jbangdev/homebrew-tap/blob/main/Formula/jbang.rb)

Can you check what is in "/Users/eric.murphy/Library/Caches/Homebrew/downloads/ca9c7959cda0d6c50efd10175e7f7e014587965ff8fe73edb61eef11fe9e3c03--jbang-0.83.0.zip" because it might not be what it says it is ?

maxandersen commented 2 years ago

never mind - found the bug.

the formula incorrectly assinged a jar to what should be a directory so when running installed by brew jbang it would not find the jar and download jbang into ~/.jbang/bin/jbang.jarthus any upgrades of brew would not find the actually brew installed jar.

That explains a few weird brew releated reports. Sorry about - will release a fix asap.

maxandersen commented 2 years ago

this was a regression somehow :/

Was originally fixed in https://github.com/jbangdev/jbang/issues/885 via https://github.com/jbangdev/jbang/commit/c697ce1e5a5e60aed8e0d071d653a95f006a5cb2 but somehow that fix got lost in move to jreleaser.