From c76d4d1451d1417694e215c5aafc0fbe4a851ea6 Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 24 Apr 2017 22:55:12 +0800 Subject: [PATCH] add publish target --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 7259aa6..d626070 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +VERSION = $(shell grep 'const version' cmd/commands/version/version.go | sed -E 's/.*"(.+)"$$/v\1/') + .PHONY: all test clean build install GOFLAGS ?= $(GOFLAGS:) @@ -18,3 +20,10 @@ bench: install clean: go clean $(GOFLAGS) -i ./... + +publish: + mkdir -p bin/$(VERSION) + cd bin/$(VERSION) + xgo -v -x --targets="windows/*,darwin/*,linux/386,linux/amd64,linux/arm-5,linux/arm64" -out bee_$(VERSION) github.com/beego/bee + cd .. + ghr -u beego -r bee $(VERSION) $(VERSION) \ No newline at end of file