Skip to content
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

goose -version always prints (devel) #585

Closed
alebcay opened this issue Aug 12, 2023 · 5 comments
Closed

goose -version always prints (devel) #585

alebcay opened this issue Aug 12, 2023 · 5 comments

Comments

@alebcay
Copy link

alebcay commented Aug 12, 2023

Running goose -version always prints goose version: (devel). The expectation is that the actual version of the program would be printed (e.g. v3.14.0). This behavior has been observed both in the binaries acquired via GitHub Releases and also when building from source.

Possibly relevant: golang/go#29228

@mfridman
Copy link
Collaborator

Thanks for the report, indeed the pre-built binaries don't get the correct version, let's fix that!

If you go install ..., it should work correctly however.

$ go install github.com/pressly/goose/v3/cmd/goose@latest
$ goose --version                                        
goose version: v3.14.0

@mfridman
Copy link
Collaborator

A regression in v3.14.0, worked okay in v3.13.4 .. I know the issue, will fix it up. Sorry about that!

$ curl -fsSL \
    https://raw.githubusercontent.com/pressly/goose/master/install.sh |\
    GOOSE_INSTALL=$HOME/.goose sh -s v3.13.4
$HOME/.goose/bin/goose --version
goose version: v3.13.4

###

$ curl -fsSL \
    https://raw.githubusercontent.com/pressly/goose/master/install.sh |\
    GOOSE_INSTALL=$HOME/.goose sh -s v3.14.0
$HOME/.goose/bin/goose --version
goose version: (devel)

@mfridman
Copy link
Collaborator

Alright, this should be fixed.

go install

$ go install github.com/pressly/goose/v3/cmd/goose@latest
$ goose --version
goose version: v3.15.0

installation script (GitHub pre-built binary)

$ curl -fsSL https://raw.githubusercontent.com/pressly/goose/master/install.sh | sudo sh -s
Goose was installed successfully to /usr/local/bin/goose
Run 'goose --help' to get started
$ goose --version
goose version: v3.15.0

Let me know if you have other issues.

@alebcay
Copy link
Author

alebcay commented Aug 13, 2023

Thanks for the quick response! Confirmed that I can see the version when using go install, from prebuilt binary, or when building from source (setting main.version via linker flags).

@mfridman
Copy link
Collaborator

Thank you for flagging it, glad that's fixed 😅 .

Closing, but if anyone continues to experience an issue drop a comment or open another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants