From bf9ad8b25c47c74e19aed7bb9f07a397f7e3810c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Jul 2013 17:47:34 +0200 Subject: [PATCH 1/4] cleanup more release related stuff Signed-off-by: Nico Schottelius --- Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 7064b364..26273258 100644 --- a/Makefile +++ b/Makefile @@ -194,7 +194,7 @@ git-branch-merge: git checkout "$$current" -$(VERSION_FILE): .git/refs/heads/* +$(VERSION_FILE): .git/refs/heads/* .git/refs/tags/* echo "VERSION = \"$$(git describe)\"" > $@ # Pub is Nico's "push to all git remotes" thing @@ -220,7 +220,7 @@ ARCHLINUXTAR=cdist-$(CHANGELOG_VERSION)-1.src.tar.gz $(ARCHLINUXTAR): PKGBUILD pypi-release makepkg -c --source -PKGBUILD: PKGBUILD.in +PKGBUILD: PKGBUILD.in $(VERSION_FILE) ./PKGBUILD.in archlinux-release: $(ARCHLINUXTAR) @@ -237,16 +237,8 @@ RELEASE+=ml-release freecode-release RELEASE+=man-dist pypi-release git-release RELEASE+=archlinux-release -release: $(RELEASE) - echo "Don't forget...: linkedin" - -release-blog: blog -release-ml: release-blog -release-pub: man - - -$(DIST): dist-check -$(RELEASE): $(DIST) $(CHECKS) +release: $(CHECKS) $(RELEASE) + echo "Manual steps: linkedin, twitter" # Code that is better handled in a shell script check-%: From a66bc8c343a9f1c45cfe9f9719e539c3b5d27658 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Jul 2013 17:48:58 +0200 Subject: [PATCH 2/4] always merge tag based, not branch based, for releases Signed-off-by: Nico Schottelius --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 26273258..5d5e8157 100644 --- a/Makefile +++ b/Makefile @@ -187,10 +187,10 @@ $(GIT_TAG_FILE): @printf "Enter tag description for $(CHANGELOG_VERSION)> " @read tagmessage; git tag "$(CHANGELOG_VERSION)" -m "$$tagmessage" -git-branch-merge: +git-branch-merge: git-tag current=$$(git rev-parse --abbrev-ref HEAD); \ git checkout "$(GIT_DST_BRANCH)" && \ - git merge "$(GIT_SRC_BRANCH)" && \ + git merge "$(CHANGELOG_VERSION)" && \ git checkout "$$current" From 511e7951c83c32b244a392784913a89b396e00f4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Jul 2013 17:56:11 +0200 Subject: [PATCH 3/4] do pypi release only once Signed-off-by: Nico Schottelius --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d5e8157..e6a9547e 100644 --- a/Makefile +++ b/Makefile @@ -210,8 +210,13 @@ git-release: git-tag git-branch-merge ################################################################################ # pypi # -pypi-release: man $(VERSION_FILE) git-tag +PYPI_FILE=.lock-pypi + +pypi-release: $(PYPI_FILE) + +$(PYPI_FILE): man $(VERSION_FILE) git-tag python3 setup.py sdist upload + touch $@ ################################################################################ # archlinux From 02c8079fef55183bee2fb83cd219974752df866d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Jul 2013 18:02:32 +0200 Subject: [PATCH 4/4] move pypi releases to go from the stable branch only Signed-off-by: Nico Schottelius --- Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e6a9547e..3660a3c2 100644 --- a/Makefile +++ b/Makefile @@ -180,6 +180,7 @@ freecode-release: $(FREECODE_FILE) GIT_TAG_FILE=.git/refs/tags/$(CHANGELOG_VERSION) GIT_SRC_BRANCH=master GIT_DST_BRANCH=$(shell echo $(CHANGELOG_VERSION) | cut -d. -f '1,2') +GIT_CURRENT=.git-current-branch git-tag: $(GIT_TAG_FILE) @@ -187,14 +188,18 @@ $(GIT_TAG_FILE): @printf "Enter tag description for $(CHANGELOG_VERSION)> " @read tagmessage; git tag "$(CHANGELOG_VERSION)" -m "$$tagmessage" -git-branch-merge: git-tag - current=$$(git rev-parse --abbrev-ref HEAD); \ - git checkout "$(GIT_DST_BRANCH)" && \ - git merge "$(CHANGELOG_VERSION)" && \ - git checkout "$$current" +git-branch-merge: git-checkout-stable + git merge "$(CHANGELOG_VERSION)" +git-checkout-stable: git-tag + @git rev-parse --abbrev-ref HEAD > $(GIT_CURRENT) + @git checkout "$(GIT_DST_BRANCH)" + make git-checkout-current -$(VERSION_FILE): .git/refs/heads/* .git/refs/tags/* +git-checkout-current: + git checkout "$$(cat $(GIT_CURRENT))" + +$(VERSION_FILE): .git/refs/heads/* .git/refs/tags/* .git/HEAD echo "VERSION = \"$$(git describe)\"" > $@ # Pub is Nico's "push to all git remotes" thing @@ -214,9 +219,11 @@ PYPI_FILE=.lock-pypi pypi-release: $(PYPI_FILE) -$(PYPI_FILE): man $(VERSION_FILE) git-tag +$(PYPI_FILE): man $(VERSION_FILE) + make git-checkout-stable python3 setup.py sdist upload touch $@ + make git-checkout-current ################################################################################ # archlinux