atmost working example
This commit is contained in:
17
makefile
Normal file
17
makefile
Normal file
@ -0,0 +1,17 @@
|
||||
VERSION=$(shell git tag --sort=v:refname 2>/dev/null | head -n1)
|
||||
REVISION=$(shell git rev-parse --short HEAD)
|
||||
BUILDTIME=$(shell date -u +%FT%T)
|
||||
|
||||
build.docker:
|
||||
docker build\
|
||||
--build-arg VERSION=${VERSION}\
|
||||
--build-arg REVISION=${REVISION}\
|
||||
--build-arg BUILDTIME=${BUILDTIME}\
|
||||
-t git.loyso.art/devsim:latest\
|
||||
.
|
||||
|
||||
build:
|
||||
CGO_ENABALED=0 go build \
|
||||
-ldflags "-w -s -X 'git.loyso.art/frx/devsim.version=${VERSION}' -X 'git.loyso.art/frx/devsim.revision=${REVISION}' -X 'git.loyso.art/frx/devsim.buildTime=${BUILDTIME}Z'" \
|
||||
-o bin/web ./cmd/web/*.go
|
||||
|
||||
Reference in New Issue
Block a user