gopass-jsonapi icon indicating copy to clipboard operation
gopass-jsonapi copied to clipboard

Installation with "go get" does not handle version

Open Pharb opened this issue 4 years ago • 2 comments
trafficstars

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 #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 https://github.com/gopasspw/gopassbridge/issues/171#issuecomment-789670449

Pharb avatar Mar 03 '21 23:03 Pharb

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 avatar Mar 06 '21 09:03 dominikschulz

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 avatar Dec 25 '22 11:12 dominikschulz