Browse Source

add publish target

tags/v1.10.0
astaxie 2 years ago
parent
commit
c76d4d1451
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      Makefile

+ 9
- 0
Makefile View File

@@ -1,3 +1,5 @@
1
+VERSION = $(shell grep 'const version' cmd/commands/version/version.go | sed -E 's/.*"(.+)"$$/v\1/')
2
+
1 3
 .PHONY: all test clean build install
2 4
 
3 5
 GOFLAGS ?= $(GOFLAGS:)
@@ -18,3 +20,10 @@ bench: install
18 20
 
19 21
 clean:
20 22
 	go clean $(GOFLAGS) -i ./...
23
+
24
+publish:
25
+	mkdir -p bin/$(VERSION)
26
+	cd bin/$(VERSION)
27
+	xgo -v -x --targets="windows/*,darwin/*,linux/386,linux/amd64,linux/arm-5,linux/arm64" -out bee_$(VERSION) github.com/beego/bee
28
+	cd ..
29
+	ghr -u beego -r bee $(VERSION) $(VERSION)

Loading…
Cancel
Save