Skip to content

Embed some meta about your Golang application.

Notifications You must be signed in to change notification settings

makasim/buildinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buildinfo

package main

import (
	"fmt"

	"github.com/makasim/buildinfo"
)

func main() {
	fmt.Println(buildinfo.String())
}
COMMIT=$(git rev-list -1 HEAD | cut -c1-8)
BUILD_DATE=${BUILD_DATE:-$(date +"%Y-%m-%d_%T%z")}
VERSION="1.2.3"

go build \
  -X github.com/makasim/buildinfo.Commit=${COMMIT} \
  -X github.com/makasim/buildinfo.Version=${VERSION} \
  -X github.com/makasim/buildinfo.Date=${BUILD_DATE} \
  main.go

About

Embed some meta about your Golang application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages