buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

Redacted version and scm version, but only when `go get`ing

Open TheButlah opened this issue 4 years ago • 6 comments

buildifier --version returns

buildifier version: redacted
buildifier scm revision: redacted

when buildifier is installed via go get, but it returns

buildifier version: 3.0.0
buildifier scm revision: dbd4ef8997abb3a7bef0ba4867caaf206db86b6e

when downloaded from github's assets in the release page.

Why is this?

TheButlah avatar May 11 '20 23:05 TheButlah

Same issue as above

$ buildifier --version
buildifier version: redacted
buildifier scm revision: redacted

This is in WSL 2 (Ubuntu 18.04 LTS) on Windows 10. Installed buildifier using:

go get github.com/bazelbuild/buildtools/buildifier

HarikrishnanBalagopal avatar Apr 30 '21 08:04 HarikrishnanBalagopal

the current release process uses bazel and the versions are pushed into the file via: https://github.com/bazelbuild/buildtools/blob/master/buildifier/BUILD.bazel#L71

Do you have a method to burn this into a go get? If so, please share.

pmbethe09 avatar Apr 30 '21 14:04 pmbethe09

I'm having a similar issue.

veliebm avatar Aug 30 '22 02:08 veliebm

This is also happening for me when I invoke via a bazel rule, as per these instructions. Example command, with output:

bazel run @com_github_bazelbuild_buildtools//buildifier:buildifier -- --version
INFO: Analyzed target @com_github_bazelbuild_buildtools//buildifier:buildifier (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @com_github_bazelbuild_buildtools//buildifier:buildifier up-to-date:
  bazel-bin/external/com_github_bazelbuild_buildtools/buildifier/buildifier_/buildifier
INFO: Elapsed time: 0.098s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
buildifier version: redacted 
buildifier scm revision: redacted 

chiphogg avatar Dec 21 '22 19:12 chiphogg

Same issue here when installed via

go install github.com/bazelbuild/buildtools/buildifier@latest

./go/bin/buildifier --version buildifier version: redacted buildifier scm revision: redacted

OS: Linux (Ubuntu) 5.10.102.1-microsoft-standard-WSL2 x86_64 x86_64 x86_64 GNU/Linux

When I download the latest binary 6.3.3 directly from the Buildtools releases page, the version is displayed correctly.

MjMoshiri avatar Nov 08 '23 21:11 MjMoshiri