summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9cf51a6..b0db260 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
GOX_OSARCH ?= "darwin/amd64 linux/amd64 linux/arm freebsd/386 freebsd/amd64 linux/386 windows/386"
GOX_OUTPUT_DIR ?= bin
-GH_ACCESS_TOKEN ?= Missing access token.
+GH_ACCESS_TOKEN ?=
MESSAGE ?= Latest release.
-all: clean
+all: build
+
+build: clean
@mkdir -p $(GOX_OUTPUT_DIR) && \
gox -osarch=$(GOX_OSARCH) -output "$(GOX_OUTPUT_DIR)/{{.Dir}}_{{.OS}}_{{.Arch}}" && \
gzip bin/vanity_darwin_* && \
@@ -14,7 +16,10 @@ all: clean
require-version:
@if [[ -z "$$VERSION" ]]; then echo "Missing \$$VERSION"; exit 1; fi
-release: require-version
+require-access-token:
+ @if [[ -z "$(GH_ACCESS_TOKEN)" ]]; then echo "Missing \$$GH_ACCESS_TOKEN"; exit 1; fi
+
+release: require-version require-access-token build
@RESP=$$(curl --silent --data '{ \
"tag_name": "v$(VERSION)", \
"name": "v$(VERSION)", \
@@ -36,3 +41,6 @@ release: require-version
clean:
@rm -rf $(GOX_OUTPUT_DIR)
+
+docker:
+ docker build -t xiam/vanity .