Skip to content

Commit

Permalink
Add a release Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Donald Guy committed May 4, 2016
1 parent 1015c47 commit 81a9749
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
NAME:=$(shell basename $$PWD)
ARCH:=$(shell uname -m)
REPO:=$(shell git config --get remote.origin.url | perl -ne 'm{github.com[:/](.+/[^.]+)}; print $$1')
VERSION=0.0.2

build:
go build

build_linux:
docker-machine start || true
bash -c 'eval $$(docker-machine env) ; rocker build --no-garbage'

release: build build_linux
rm -rf release && mkdir release
mkdir -p build/Darwin && mv $(NAME) build/Darwin
tar -zcf release/$(NAME)_$(VERSION)_darwin_$(ARCH).tgz -C build/Darwin $(NAME)
tar -zcf release/$(NAME)_$(VERSION)_linux_$(ARCH).tgz -C build/Linux $(NAME)
gh-release create $(REPO) $(VERSION) master

.PHONY: release build build_linux
3 changes: 2 additions & 1 deletion Rockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ WORKDIR /go/src/github.com/tulip/terraform-provider-twilio
ATTACH ["/bin/bash"]
RUN go get
TAG terraform-provider-twilio-buildenv
RUN go build
RUN mkdir -p build/Linux
RUN go build -o build/Linux/terraform-provider-twilio

0 comments on commit 81a9749

Please sign in to comment.