Skip to content

Commit 53affd4

Browse files
committed
fix: release process in makefile
1 parent 0fea277 commit 53affd4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OWNER := dnitsch
22
NAME := aws-cli-auth
3-
VERSION := v0.7.0
3+
VERSION := v0.7.2
44
REVISION := $(shell git rev-parse --short HEAD)
55

66

@@ -43,12 +43,18 @@ cross-build:
4343
release: cross-build
4444
git tag $(VERSION)
4545
git push origin $(VERSION)
46-
curl \
46+
id=$(curl \
4747
-X POST \
4848
-u $(OWNER):$(PAT) \
4949
-H "Accept: application/vnd.github.v3+json" \
5050
https://api.github.com/repos/$(OWNER)/$(NAME)/releases \
51-
-d '{"tag_name":"$(VERSION)","generate_release_notes":true,"prerelease":false}'
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=$(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
5258

5359
.PHONY: deps
5460
deps:

0 commit comments

Comments
 (0)