Skip to content

Commit

Permalink
Added a Makefile for signing and versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
lox committed Sep 2, 2015
1 parent 98b6f6e commit 1bae113
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 1bae113

Please sign in to comment.