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

Installation with "go get" does not handle version #14

Open
Pharb opened this issue Mar 3, 2021 · 2 comments
Open

Installation with "go get" does not handle version #14

Pharb opened this issue Mar 3, 2021 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Pharb
Copy link
Member

Pharb commented Mar 3, 2021

Summary

"go get" installation does not handle version and produces binary incompatible with gopassbridge (version mismatch).

Steps To Reproduce

go get github.com/gopasspw/gopass-jsonapi

The first problem is this error complaining about uninitialized gopass store.
If possible it shouldn't be necessary to have an initialized store to run "help", "version" or "configure".

Failed to initialize gopass API: store not initialized. run gopass init first

Second error only happens when using "go get" for to compile the binary:

$ ./gopass-jsonapi --version
Incorrect Usage. flag provided but not defined: -version

Expected behavior

Following command completes successfully and outputs the latest released version of gopass-jsonapi:

docker run --rm golang bash -c 'go get github.com/gopasspw/gopass-jsonapi && ./bin/gopass-jsonapi --version'

Environment

  • OS: checked with Docker on Mac, probably independent of OS
  • OS version: Linux ef82b619761e 4.19.121-linuxkit jsonapi to support edit #1 SMP Tue Dec 1 17:50:32 UTC 2020 x86_64 GNU/Linux
  • gopass-jsonapi Version: gopass-jsonapi version 1.11.1
  • Installation method: compiled from source

Additional context

see discussion from gopasspw/gopassbridge#171 (comment)

@Pharb Pharb added bug Something isn't working help wanted Extra attention is needed labels Mar 3, 2021
Pharb added a commit that referenced this issue Mar 3, 2021
See also #14

RELEASE_NOTES=Workaround to compile from source using Makefile

Signed-off-by: Patrick Harböck <[email protected]>
@dominikschulz
Copy link
Member

gopass itself updates the file version.go on every release. This is then checked in to git and available when fetching with go get.

@dominikschulz
Copy link
Member

I've update the post-release helper in gopasspw/gopass to also write a version.go into the integrations. This should be automatically fixed with the next release.

@dominikschulz dominikschulz self-assigned this Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants