Skip to content
Snippets Groups Projects
Andy Cobaugh's avatar
Andy Cobaugh authored
Configure Renovate

See merge request !1
c51ff983
History

buildversion

Usage

Use in your App

import git.psu.edu/swe-golang/buildversion


details := buildversion.Get()
// Do Whatever you want.

Build Command for Your App

Makefile

go build ldflags "-X git.psu.edu/swe-golang/buildversion.commit=$(shell git rev-parse --short HEAD) -X git.psu.edu/swe-golang/buildversion.version=$(shell git describe --tags 2>/dev/null) -X git.psu.edu/swe-golang/buildversion.buildDate=$(shell date -Iseconds) -X git.psu.edu/swe-golang/buildversion.pipeID=blah"