-
Notifications
You must be signed in to change notification settings - Fork 821
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a Makefile for signing and versioning
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |