From 4e898b24e456d80e70b4c0719b83717bcc123f87 Mon Sep 17 00:00:00 2001 From: Vasile Popescu Date: Wed, 23 May 2018 23:53:06 +0200 Subject: [PATCH] Add zipping the release binaries in the Makefile --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 67bca74..b51a4c0 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,17 @@ $(TTY_SENDER): $(TTY_SENDER_SRC) $(EXTRA_BUILD_DEPS) tty-server/assets_bundle.go: $(TTY_SERVER_ASSETS) go-bindata --prefix frontend/public/ -o $@ $^ -dist: frontend $(TTY_SERVER_SRC) $(TTY_SENDER_SRC) $(EXTRA_BUILD_DEPS) - GOOS=linux go build -o tty_server.linux $(TTY_SERVER_SRC) - GOOS=darwin go build -o tty_server.darwin $(TTY_SERVER_SRC) - GOOS=linux go build -o tty_sender.linux $(TTY_SENDER_SRC) - GOOS=darwin go build -o tty_sender.darwin $(TTY_SENDER_SRC) +# We only care about creating release binaries for the sender side +dist: frontend tty_sender.linux.zip tty_sender.osx.zip + +%.zip: % + zip $@ $^ + +tty_sender.osx: $(TTY_SENDER_SRC) $(EXTRA_BUILD_DEPS) + GOOS=darwin go build -o $@ $(TTY_SENDER_SRC) + +tty_sender.linux: $(TTY_SENDER_SRC) $(EXTRA_BUILD_DEPS) + GOOS=linux go build -o $@ $(TTY_SENDER_SRC) frontend: FORCE cd frontend && npm run build && cd -