Skip to content

Commit

Permalink
Preparing release 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Dec 28, 2017
1 parent 054187d commit 35b3a2c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Changes

.. currentmodule:: objgraph

3.2.1 (unreleased)
3.3.0 (2017-12-28)
------------------

- New function: :func:`growth`.
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,19 @@ config-imgdiff:
imgdiff: config-imgdiff
$(VCS_DIFF_IMAGES)


.PHONY: releasechecklist
releasechecklist: check-date # also release.mk will add other checks

include release.mk

.PHONY: check-date
check-date:
@date_line="__date__ = '`date +%Y-%m-%d`'" && \
grep -q "^$$date_line$$" $(FILE_WITH_VERSION) || { \
echo "$(FILE_WITH_VERSION) doesn't specify $$date_line"; exit 1; }


.PHONY: do-release
do-release: config-imgdiff

Expand All @@ -92,6 +103,7 @@ define release_recipe =
@echo "then either revert or commit the new images and run"
@echo
@echo " $(PYPI_PUBLISH)"
@echo " $(VCS_TAG)"
@echo " make publish-docs"
@echo
@echo "Please increment the version number in $(FILE_WITH_VERSION)"
Expand Down
4 changes: 2 additions & 2 deletions objgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
__author__ = "Marius Gedminas ([email protected])"
__copyright__ = "Copyright (c) 2008-2017 Marius Gedminas and contributors"
__license__ = "MIT"
__version__ = '3.2.1.dev0'
__date__ = "2017-10-30"
__version__ = '3.3.0'
__date__ = '2017-12-28'


try:
Expand Down
14 changes: 8 additions & 6 deletions release.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Makefile.rules version 1.0 (2017-12-19)
# Makefile.rules version 1.1 (2017-12-20)
#
# Helpful Makefile rules for releasing Python packages.
# https://github.com/mgedmin/python-project-skel

# You might want to change these
FILE_WITH_VERSION ?= setup.py
Expand All @@ -10,15 +11,18 @@ CHANGELOG_FORMAT ?= $(changelog_ver) ($(changelog_date))

# These should be fine
PYTHON ?= python
PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine upload dist/* && $(VCS_TAG) `$(PYTHON) setup.py --version`
PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine upload dist/*

# These should be fine, as long as you use Git
VCS_GET_LATEST ?= git pull
VCS_STATUS ?= git status --porcelain
VCS_EXPORT ?= git archive --format=tar --prefix=tmp/tree/ HEAD | tar -xf -
VCS_TAG ?= git tag -s
VCS_TAG ?= git tag -s $(changelog_ver) -m \"Release $(changelog_ver)\"
VCS_COMMIT_AND_PUSH ?= git commit -av -m "Post-release version bump" && git push && git push --tags

# These are internal implementation details
changelog_ver = `$(PYTHON) setup.py --version`
changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`


.PHONY: dist
Expand Down Expand Up @@ -81,9 +85,6 @@ check-version-number:
check-long-description:
@$(PYTHON) setup.py --long-description | rst2html --exit-status=2 > /dev/null

changelog_ver = `$(PYTHON) setup.py --version`
changelog_date = `LC_ALL=C date +'$(CHANGELOG_DATE_FORMAT)'`

.PHONY: check-changelog
check-changelog:
@ver_and_date="$(CHANGELOG_FORMAT)" && \
Expand All @@ -106,6 +107,7 @@ define release_recipe =
@echo "Please run"
@echo
@echo " $(PYPI_PUBLISH)"
@echo " $(VCS_TAG)"
@echo
@echo "Please increment the version number in $(FILE_WITH_VERSION)"
@echo "and add a new empty entry at the top of the changelog in $(FILE_WITH_CHANGELOG), then"
Expand Down

0 comments on commit 35b3a2c

Please sign in to comment.