pass through arguments from command line

This commit is contained in:
Dominic Breuker
2018-02-13 21:41:41 +01:00
parent c92dd9992f
commit 4495ae7c96
8 changed files with 60 additions and 23 deletions

View File

@@ -6,3 +6,19 @@ build-dev:
dev:
docker run -it --rm -v $(PROJECT_DIR):/go/src/github.com/dominicbreuker/pspy $(DEV_IMAGE)
release:
docker run -it \
--rm \
-v $(PROJECT_DIR):/go/src/github.com/dominicbreuker/pspy \
--env CGO_ENABLED=0 \
--env GOOS=linux \
--env GOARCH=386 \
$(DEV_IMAGE) go build -a -ldflags '-extldflags "-static"' -o pspy/bin/pspy32 pspy/main.go
docker run -it \
--rm \
-v $(PROJECT_DIR):/go/src/github.com/dominicbreuker/pspy \
--env CGO_ENABLED=0 \
--env GOOS=linux \
--env GOARCH=amd64 \
$(DEV_IMAGE) go build -a -ldflags '-extldflags "-static"' -o pspy/bin/pspy64 pspy/main.go