score-spec / docs

Docs for Score Specification.
https://docs.score.dev/docs/
Apache License 2.0
6 stars 12 forks source link

Install the Score implementation (CLI) - dirt version via go #61

Open mohsenSy opened 1 year ago

mohsenSy commented 1 year ago

Hi, I am trying to install score-humanitec CLI via go using this command

go install -v github.com/score-spec/score-humanitec/cmd/score-humanitec@latest

If I check the version installed after this command using score-humanitec --version I get this

score-humanitec 0.0.0 (build: local; sha: dirty)

However, if I copy download and use the archive file I get the right version. Could you please fix the installation via go so we don't get dirty versions?

The two binary files installed via go install ... and via downloading the archive have two different checksums.

astromechza commented 8 months ago

This is generally expected behavior when performing a local build of the CLI using the bare go install as there is no way to embed the git commit in the binary.

We could look at using the lesser known go install -buildvcs option in some cases and we could access this build information at runtime.