Skip to content

Commit

Permalink
Improve release make target
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Aug 11, 2016
1 parent 0b7b389 commit 6198617
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SHELL=/bin/bash -c 'set -eo pipefail; [[ -f environment ]] && source environment; shift; eval $$@' $@
GH_AUTH_FILE=~/.github_token
CLEAN_DIRS=aegea

release_major:
$(eval export TAG=$(shell git describe --tags --match 'v*.*.*' | perl -ne '/^v(\d)+\.(\d)+\.(\d+)+/; print "v@{[$$1+1]}.0.0"'))
Expand All @@ -20,8 +21,8 @@ release:
$(eval GH_AUTH=$(shell if [[ -e $(GH_AUTH_FILE) ]]; then echo $(GIT_USER):$$(cat $(GH_AUTH_FILE)); else echo $(GIT_USER); fi))
$(eval RELEASES_API=https://api.github.com/repos/${REMOTE}/releases)
$(eval UPLOADS_API=https://uploads.github.com/repos/${REMOTE}/releases)
git clean -x --force aegea
git tag --sign --annotate ${TAG}
git clean -x --force ${CLEAN_DIRS}
git tag --sign --annotate ${TAG} # --template <(git log --pretty=format:%s $$(git describe --abbrev=0)..HEAD)
git push --follow-tags
http --auth ${GH_AUTH} ${RELEASES_API} tag_name=${TAG} name=${TAG} body="$$(git tag --list ${TAG} -n99 | perl -pe 's/^\S+\s*// if $$. == 1' | sed 's/^\s\s\s\s//')"
$(MAKE) install
Expand Down

0 comments on commit 6198617

Please sign in to comment.