srishanbhattarai / nepcal

Cross-platform utilities for Nepali dates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use link time variables for versioning (release script)

srishanbhattarai opened this issue · comments

There have been several instances in which I simply forgot to update the version number in code for the CLI

const version = "v1.1.0"

The release has the right tag number the CLI version is incorrect.

I believe the way to do this should be an ldflags build time variable.

The Goreleaser build page has more information. Example:

    ldflags:
     - -s -w -X main.build={{.Version}}
     - ./usemsan=-msan

The {{.Version}} template seems to automatically do the right thing as described here which uses the current tag as the version number.

No cares about this one for now