You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
brew gist-logs <formula> link OR brew config AND brew doctor output
brew config
HOMEBREW_VERSION: 4.1.25
ORIGIN: https://github.com/Homebrew/brew
HEAD: c32bd1c7cc0c3b1b914845bddfeda53f4d877a3f
Last commit: 11 days ago
Core tap JSON: 17 Dec 08:53 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit icelake
Clang: 13.1.6 build 1316
Git: 2.39.0 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5.1-x86_64
CLT: 13.4.0.0.1.1651278267
Xcode: N/A
brew doctor
```consolePlease note that these warnings are just used to help the Homebrew maintainerswith debugging if you file an issue. If everything you use Homebrew for isworking fine: please don't worry or file an issue; just ignore this. Thanks!Warning: A newer Command Line Tools release is available.Update them from Software Update in System Preferences.If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --installAlternatively, manually download them from: https://developer.apple.com/download/all/.You should download the Command Line Tools for Xcode 14.2.Warning: Some installed formulae are deprecated or disabled.You should find replacements for the following formulae:[email protected][email protected] prototoolWarning: You have unlinked kegs in your Cellar.Leaving kegs unlinked can lead to build-trouble and cause formulae that depend onthose kegs to fail to run properly once built. Run `brew link` on these:[email protected]Warning: Homebrew's "sbin" was not found in your PATH but you have installedformulae that put executables in /usr/local/sbin.Consider setting your PATH for example like so: echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
### Verification
- [X] My "`brew doctor` output" says `Your system is ready to brew.` and am still able to reproduce my issue.
- [X] I ran `brew update` and am still able to reproduce my issue.
- [X] I have resolved all warnings from `brew doctor` and that did not fix my problem.
- [X] I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
### What were you trying to do (and why)?
In macOS, after run `brew install golangci-lint`, `golangci-lint version` returns its version in different format.
```console
golangci-lint version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265 on 2023-11-02T21:40:02Z
Instead of vMajor.minor.patch that is the expected in other platforms.
Eg using docker alternative:
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint versiongolangci-lint has version v1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T13:27:54Z
golangci-lint versiongolangci-lint has version 1.55.2 built with go1.21.3 from e3c2265 on 2023-11-02T21:40:02Z
What did you expect to happen?
Return a vMajor.minor.patch format version.
Eg using docker alternative:
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint versiongolangci-lint has version v1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T13:27:54Z
brew install golangci-lint
golangci-lint version
We can solve the problem [here](https://github.com/Homebrew/homebrew-core/blob/56b593d11f0fadf7f63b0b437a5cb520c83489e1/Formula/g/golangci-lint.rb#L25) adding:
def install
ldflags = %W[
-s-w
-X main.version="v#{version}"
-X main.commit=#{Utils.git_short_head(length: 7)}
-X main.date=#{time.iso8601}
]
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/golangci-lint"
generate_completions_from_executable(bin/"golangci-lint", "completion")
end
The text was updated successfully, but these errors were encountered:
The binary releases distributed at https://github.com/golangci/golangci-lint/releases don't seem to have a v prefix when running golangci-lint --version - maybe this is worth raising upstream, since this is inconsistent in what they distribute (standalone binaries vs container images).
Once upstream settles on one pattern or the other, we can follow the same here.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputInstead of
vMajor.minor.patch
that is the expected in other platforms.Eg using docker alternative:
Related to issue
What happened (include all command output)?
What did you expect to happen?
Return a
vMajor.minor.patch
format version.Eg using docker alternative:
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: