Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f2bacf2

Browse files
author
Matthieu Nottale
committed
Makefile: new targets bin-all and release.
Signed-off-by: Matthieu Nottale <[email protected]>
1 parent 3ae9b51 commit f2bacf2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
PKG_NAME := github.com/docker/lunchbox
22
BIN_NAME := docker-app
33

4+
TAG := ${shell git describe --always --dirty}
5+
46
IMAGE_NAME := docker-app
57

68
GO_VERSION := 1.10
@@ -27,6 +29,15 @@ bin: CHECK_GO_ENV
2729
@echo "Building _build/bin/$(BIN_NAME)$(EXEC_EXT)..."
2830
@go build -ldflags=$(LDFLAGS) -i -o _build/bin/$(BIN_NAME)$(EXEC_EXT) ./
2931

32+
bin-all: CHECK_GO_ENV
33+
@echo "Building for all archs in _build/$(TAG)"
34+
GOOS=windows go build -ldflags=$(LDFLAGS) -i -o _build/$(TAG)/$(BIN_NAME)-windows.exe ./
35+
GOOS=linux go build -ldflags=$(LDFLAGS) -i -o _build/$(TAG)/$(BIN_NAME)-linux ./
36+
GOOS=darwin go build -ldflags=$(LDFLAGS) -i -o _build/$(TAG)/$(BIN_NAME)-macos ./
37+
38+
release:
39+
gsutil cp -r _build/$(TAG) gs://docker_app
40+
3041
image:
3142
@docker build -t $(IMAGE_NAME) $(IMAGE_BUILD_ARGS) . --target run
3243

0 commit comments

Comments
 (0)