aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bakker <661642+SionX@users.noreply.github.com>2020-03-31 19:03:45 +0200
committerGitHub <noreply@github.com>2020-03-31 10:03:45 -0700
commita21d894fb128e49d6ef912bbed51bfb0754223fa (patch)
tree42e8c7fc944e4d9b75f3e6f22cbdb16da27741bc
parent70bb90ae82abb46c0434d806cfd79e25b7c0098d (diff)
make build productions binaries (#5)
* added production build commands in make * Small spelling error :-( but fixed it * style: changed flags into single variable that can be used mutible times * Read comment more better made it even better ;-) * learn to test and not rush things * Rename LDFLAG to LDFLAGS LDFLAGS is idiomatic. Co-authored-by: Raul Benencia <raul@thousandeyes.com>
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a831cb3..5f33e91 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
GO = go
SCDOC = scdoc
+LDFLAGS = "-s -w"
pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
@@ -22,3 +23,9 @@ test: fmt
./test/integ-test/integ_test.py
.PHONY: all clean docs
+
+binaries: linux windows
+linux:
+ GOOS=linux ${GO} build -o bin/shoelaces -ldflags ${LDFLAGS}
+windows:
+ GOOS=windows ${GO} build -o bin/shoelaces.exe -ldflags ${LDFLAGS}
nihil fit ex nihilo