mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 09:40:36 +00:00
Tweak release structure in Makefile
Allow changelog to be updated without doing anything else so dist builds can be tried before actual release/upload
This commit is contained in:
8
Makefile
8
Makefile
@@ -152,7 +152,7 @@ $(DIST_DSC): $(PY_SOURCES) $(SUBDIRS) $(DEB_SOURCES) $(MAN_PAGES)
|
|||||||
mkdir -p dist/
|
mkdir -p dist/
|
||||||
for f in $(DIST_DSC); do cp ../$${f##*/} dist/; done
|
for f in $(DIST_DSC); do cp ../$${f##*/} dist/; done
|
||||||
|
|
||||||
release: $(PY_SOURCES) $(DOC_SOURCES) $(DEB_SOURCES)
|
changelog: $(PY_SOURCES) $(DOC_SOURCES) $(DEB_SOURCES)
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
# ensure there are no current uncommitted changes
|
# ensure there are no current uncommitted changes
|
||||||
test -z "$(shell git status --porcelain)"
|
test -z "$(shell git status --porcelain)"
|
||||||
@@ -160,17 +160,17 @@ release: $(PY_SOURCES) $(DOC_SOURCES) $(DEB_SOURCES)
|
|||||||
dch --newversion $(VER)$(DEB_SUFFIX) --controlmaint
|
dch --newversion $(VER)$(DEB_SUFFIX) --controlmaint
|
||||||
# commit the changes and add a new tag
|
# commit the changes and add a new tag
|
||||||
git commit debian/changelog -m "Updated changelog for release $(VER)"
|
git commit debian/changelog -m "Updated changelog for release $(VER)"
|
||||||
|
|
||||||
|
release: $(PY_SOURCES) $(DOC_SOURCES) $(DIST_DEB) $(DIST_DSC)
|
||||||
git tag -s v$(VER) -m "Release v$(VER)"
|
git tag -s v$(VER) -m "Release v$(VER)"
|
||||||
|
git push --tags
|
||||||
# update the package's registration on PyPI (in case any metadata's changed)
|
# update the package's registration on PyPI (in case any metadata's changed)
|
||||||
$(PYTHON) $(PYFLAGS) setup.py register -r https://pypi.python.org/pypi
|
$(PYTHON) $(PYFLAGS) setup.py register -r https://pypi.python.org/pypi
|
||||||
|
|
||||||
upload: $(PY_SOURCES) $(DOC_SOURCES) $(DIST_DEB) $(DIST_DSC)
|
|
||||||
# build a source archive and upload to PyPI
|
# build a source archive and upload to PyPI
|
||||||
$(PYTHON) $(PYFLAGS) setup.py sdist upload -r https://pypi.python.org/pypi
|
$(PYTHON) $(PYFLAGS) setup.py sdist upload -r https://pypi.python.org/pypi
|
||||||
# build the deb source archive and upload to Raspbian
|
# build the deb source archive and upload to Raspbian
|
||||||
dput raspberrypi dist/$(NAME)_$(VER)$(DEB_SUFFIX)_source.changes
|
dput raspberrypi dist/$(NAME)_$(VER)$(DEB_SUFFIX)_source.changes
|
||||||
dput raspberrypi dist/$(NAME)_$(VER)$(DEB_SUFFIX)_$(DEB_ARCH).changes
|
dput raspberrypi dist/$(NAME)_$(VER)$(DEB_SUFFIX)_$(DEB_ARCH).changes
|
||||||
git push --tags
|
|
||||||
|
|
||||||
.PHONY: all install develop test doc source egg zip tar deb dist clean tags release upload $(SUBDIRS)
|
.PHONY: all install develop test doc source egg zip tar deb dist clean tags release upload $(SUBDIRS)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user