gopasspw / gopass-jsonapi

Gopass Browser Bindings
MIT License
50 stars 18 forks source link

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

Open Pharb opened 3 years ago

Pharb commented 3 years ago

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

Additional context

see discussion from https://github.com/gopasspw/gopassbridge/issues/171#issuecomment-789670449

dominikschulz commented 3 years ago

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 commented 1 year ago

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.