From 1bae11392ea555f3308418f8f55e2522e72c5a3d Mon Sep 17 00:00:00 2001 From: Lachlan Donald Date: Thu, 3 Sep 2015 09:21:14 +1000 Subject: [PATCH] Added a Makefile for signing and versioning --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..6f4abdb67 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +VERSION := $(shell git describe --tags --candidates=1) +GOBUILD_ARGS := -ldflags "-s -X main.Version=$(VERSION)" +OS := $(shell uname -s) +ARCH := $(shell uname -m) +BIN := aws-vault +FULL_BIN := $(BIN)-$(OS)-$(ARCH) +SIGN_IDENTITY := "3rd Party Mac Developer Application: 99designs Inc (NRM9HVJ62Z)" + +.PHONY: build install sign clean + +$(FULL_BIN): + godep go build $(GOBUILD_ARGS) -o $(FULL_BIN) . + +clean: + -rm $(FULL_BIN) + +build: $(FULL_BIN) + +install: $(FULL_BIN) + cp $(FULL_BIN) $(GOBIN)/$(BIN) + +sign: build + codesign -s $(SIGN_IDENTITY) -v $(FULL_BIN) \ No newline at end of file