Skip to content

Versioning reference reference template inspired by @campoy

Notifications You must be signed in to change notification settings

cbergoon/versioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8849a7a · Oct 7, 2018

History

8 Commits
Oct 7, 2018
Oct 7, 2018
Oct 7, 2018
Oct 7, 2018
Oct 7, 2018
Oct 7, 2018

Repository files navigation

Versioning - A reference template inspired by @campoy

Build

The implementation uses build tags and ldflags to provide a way to dynamically version a Go project.

Build for Development

$ make dev

or

$ go build -ldflags "-X main.commit=$(git rev-parse HEAD) -X main.version=v0.1.0 -X main.built=$(date '+%d/%m/%YT%H:%M:%S')"

Build for Production

$ make prod

or

$ go build -tags prod -ldflags "-X main.commit=$(git rev-parse HEAD) -X main.version=v0.1.0 -X main.built=$(date '+%d/%m/%YT%H:%M:%S')"

About

Versioning reference reference template inspired by @campoy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published