improved building
This commit is contained in:
4
Makefile
4
Makefile
@@ -26,6 +26,7 @@ endif
|
||||
progName = scaffold
|
||||
arch = amd64
|
||||
winbinName = $(progName).exe
|
||||
releaseTag = $(shell git describe --abbrev=0)
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Helpers
|
||||
@@ -58,6 +59,7 @@ linkerflags = '-s'
|
||||
prep: clean
|
||||
> date +"%F %a %T %Z" > buildTime.txt
|
||||
> git describe --always --tags --dirty --long > buildVersion.txt
|
||||
> mkdir -p build
|
||||
|
||||
build: prep linux windows
|
||||
|
||||
@@ -65,7 +67,7 @@ linux:
|
||||
> @GOOS=$@ GOARCH=$(arch) go build -o build/$@/$(progName) . && echo $@ "Build success" || echo $@ "[FAILED] go build"
|
||||
|
||||
windows:
|
||||
> @GOOS=$@ GOARCH=$(arch) go build -o build/$@/$(winbinName) . && echo $@ "Build success" || echo $@ "[FAILED] go build"
|
||||
> @GOOS=$@ GOARCH=$(arch) go build -o build/$@/$(progName)-$(arch)-$(releaseTag).exe . && echo $@ "Build success" || echo $@ "[FAILED] go build"
|
||||
|
||||
build-production: prep linx-production
|
||||
|
||||
|
||||
Reference in New Issue
Block a user