Shopify / ejson

EJSON is a small library to manage encrypted secrets using asymmetric encryption.
MIT License
1.35k stars 62 forks source link

goreleaser: embed VERSION #153

Closed thepwagner closed 4 months ago

thepwagner commented 4 months ago

Replace the logic in Makefile that replaces cmd/ejson/version.go with the current tag.

It's more common to inject these variables during linking, instead of generating source code.

Verify like:

$ cat cmd/ejson/version.go
package main

var VERSION string = "1.5.0"

$ goreleaser build --snapshot --rm-dist

$ dist/ejson_darwin_arm64/ejson --version
ejson version 1.5.1-SNAPSHOT-1ecf7d7