From 9eabe58b95272c0d6fc2bd700d73a7e7e13569e1 Mon Sep 17 00:00:00 2001 From: Mark Wolfe Date: Sun, 13 Dec 2015 19:40:38 +1100 Subject: [PATCH] Updated building and release tooling. --- .gitignore | 1 + Makefile | 25 +++++++++++++++++++++++++ README.md | 4 ++-- cmd/{unicred => unicreds}/main.go | 0 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Makefile rename cmd/{unicred => unicreds}/main.go (100%) diff --git a/.gitignore b/.gitignore index e69de29..378eac2 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6b026d0 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +NAME=unicreds +ARCH=$(shell uname -m) +VERSION=1.0.0 +GO15VENDOREXPERIMENT=1 + +vendor: + godep save + +build: + rm -rf build && mkdir build + mkdir -p build/Linux && GOOS=linux go build -ldflags "-X main.Version=$(VERSION)" -o build/Linux/$(NAME) ./cmd/unicreds + mkdir -p build/Darwin && GOOS=darwin go build -ldflags "-X main.Version=$(VERSION)" -o build/Darwin/$(NAME) ./cmd/unicreds + mkdir -p build/Darwin && GOOS=windows go build -ldflags "-X main.Version=$(VERSION)" -o build/Windows/$(NAME).exe ./cmd/unicreds + +test: + go test ./... + +release: build + rm -rf release && mkdir release + tar -zcf release/$(NAME)_$(VERSION)_linux_$(ARCH).tgz -C build/Linux $(NAME) + tar -zcf release/$(NAME)_$(VERSION)_darwin_$(ARCH).tgz -C build/Darwin $(NAME) + tar -zcf release/$(NAME)_$(VERSION)_windows_$(ARCH).tgz -C build/Windows $(NAME) + gh-release create versent/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) + +.PHONY: build test release diff --git a/README.md b/README.md index 5aacd93..1c93742 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ unicreds is currently a pretty faithful port of [credstash](https://github.com/fugue/credstash) to [golang](https://golang.org/). This utility enables secure storage secrets in [DynamoDB](https://aws.amazon.com/dynamodb/) using [KMS](https://aws.amazon.com/kms/) to encrypt and sign these Credentials. Access to these keys is controlled using [IAM](https://aws.amazon.com/iam/). -# disclaimer +# building + -This is currently a work in progress, things are progressing but it is a side project. # why diff --git a/cmd/unicred/main.go b/cmd/unicreds/main.go similarity index 100% rename from cmd/unicred/main.go rename to cmd/unicreds/main.go