From 48ac47487276dcc2ea72d7b00771e76723cd2933 Mon Sep 17 00:00:00 2001 From: Blallo Date: Fri, 22 May 2020 16:13:31 +0200 Subject: [PATCH] Bump version 0.5 -> 0.6 --- Makefile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 5a7bd90..ba0d535 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERS_MAJOR := 0 -VERS_MINOR := 5 +VERS_MINOR := 6 VERSION := $(VERS_MAJOR).$(VERS_MINOR) NEW_MINOR := $$(( $(VERS_MINOR) + 1 )) NEW_MAJOR := $$(( $(VERS_MAJOR) + 1 )) @@ -36,15 +36,16 @@ bumpvers-major: git tag $(NEW_MAJOR).$(VERS_MINOR) new-release: - last_tag=$$(git tag|tail -n2|head -n1); \ - release_id=$$(curl -X POST \ + @last_tag=$$(git tag|tail -n2|head -n1); \ + diffs=$$(git log --pretty=oneline --abbrev-commit $${last_tag}..HEAD~); \ + release_id=$$(curl -X POST -s \ "$(GITEA_URL)/api/v1/repos/blallo/sendmail/releases" \ -H "Authorization: token $$(cat .token)" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ - -d "{\"body\": \"$$(git log $${last_tag}..HEAD~)\", \"draft\": false, \"name\": \"$(VERSION)\", \"prerelease\": false, \"tag_name\": \"$(VERSION)\", \"target_commitish\": \"$$(git rev-parse HEAD)\" }") \ - | jq '.id'; \ - curl -X POST \ + -d "{\"body\": \"${diffs}\", \"draft\": false, \"name\": \"$(VERSION)\", \"prerelease\": false, \"tag_name\": \"$(VERSION)\", \"target_commitish\": \"$$(git rev-parse HEAD)\" }" \ + | jq '.id'); \ + curl -X POST -s \ "$(GITEA_URL)/api/v1/repos/blallo/sendmail/releases/$${release_id}/assets?name=sendmail" \ -H "Authorization: token $$(cat .token)" \ -H "accept: application/json" \ @@ -55,16 +56,16 @@ release-min: make bumpvers-minor make build make docker-build - git push - git push --tags + git push unit + git push --tags unit make new-release release-maj: make bumpvers-major make build make docker-build - git push - git push --tags + git push unit + git push --tags unit make new-release PHONY: bumpvers-minor bumpvers-major release-min release-maj clean docker-build new-release