|
1 | 1 | OWNER := dnitsch |
2 | 2 | NAME := aws-cli-auth |
3 | | -VERSION := v0.7.4 |
| 3 | +VERSION := v0.7.7 |
4 | 4 | REVISION := $(shell git rev-parse --short HEAD) |
5 | 5 |
|
6 | | - |
7 | 6 | LDFLAGS := -ldflags="-s -w -X \"github.com/dnitsch/aws-cli-auth/cmd.Version=$(VERSION)\" -X \"github.com/dnitsch/aws-cli-auth/cmd.Revision=$(REVISION)\" -extldflags -static" |
8 | 7 |
|
9 | 8 | .PHONY: test test_ci tidy install buildprep build buildmac buildwin |
@@ -40,21 +39,23 @@ cross-build: |
40 | 39 | GOOS=$$os CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o dist/$(NAME)-$$os$$EXT .; \ |
41 | 40 | done |
42 | 41 |
|
43 | | -release: cross-build |
| 42 | +# cross-build |
| 43 | +release: |
44 | 44 | git tag $(VERSION) |
45 | 45 | git push origin $(VERSION) |
46 | | - id=$(shell curl \ |
47 | | - -X POST \ |
48 | | - -u $(OWNER):$(PAT) \ |
49 | | - -H "Accept: application/vnd.github.v3+json" \ |
50 | | - https://api.github.com/repos/$(OWNER)/$(NAME)/releases \ |
51 | | - -d '{"tag_name":"$(VERSION)","generate_release_notes":true,"prerelease":false}' | jq -r .id) \ |
52 | | - upload_url=https://uploads.github.com/repos/$(OWNER)/$(NAME)/releases/$$id/assets; \ |
53 | | - for asset in dist/*; do \ |
54 | | - echo $$asset; \ |
55 | | - name=$(shell echo $$asset | cut -c 6-); \ |
56 | | - curl -u $(OWNER):$(PAT) -H "Content-Type: application/x-binary" -X POST --data-binary "@$$asset" "$$upload_url?name=$$name"; \ |
57 | | - done |
| 46 | + OWNER=$(OWNER) NAME=$(NAME) PAT=$(PAT) VERSION=$(VERSION) . hack/release.sh |
| 47 | +# id=$(shell curl \ |
| 48 | +# -X POST \ |
| 49 | +# -u $(OWNER):$(PAT) \ |
| 50 | +# -H "Accept: application/vnd.github.v3+json" \ |
| 51 | +# https://api.github.com/repos/$(OWNER)/$(NAME)/releases \ |
| 52 | +# -d '{"tag_name":"$(VERSION)","generate_release_notes":true,"prerelease":false}' | jq -r .id) \ |
| 53 | +# upload_url=https://uploads.github.com/repos/$(OWNER)/$(NAME)/releases/$$id/assets; \ |
| 54 | +# for asset in dist/*; do \ |
| 55 | +# echo $$asset; \ |
| 56 | +# name=$(shell echo $asset | cut -c 6-); \ |
| 57 | +# curl -u $(OWNER):$(PAT) -H "Content-Type: application/x-binary" -X POST --data-binary "@$$asset" "$$upload_url?name=$$name"; \ |
| 58 | +# done |
58 | 59 |
|
59 | 60 | .PHONY: deps |
60 | 61 | deps: |
|
0 commit comments