1
0
mirror of https://github.com/ansible/mazer.git synced 2026-02-05 12:45:17 +01:00

Updates to enable using 'bumpversion'

Add ansible_galaxy/__init__ to bumpversion files

Remove ansible_galaxy_cli import in setup.py

Add dev/bumpversion targets to Makefile

See https://github.com/peritus/bumpversion for
bumpversion docs.

If current version is '0.1.0',
use 'bumpversion patch' or 'make dev/bumpversion-patch' to:

- Replace ansible_galaxy*/__init__.py __version__ value with '0.1.1'
- Replace setup.py 'version' value with '0.1.1'
- Replace setup.cfg 'version' value with '0.1.1'
- commit those changes with the message
  "Bump version: 0.1.0 → 0.1.1"
- git tag as 'v0.1.1'
This commit is contained in:
Adrian Likins
2018-06-27 09:29:01 -04:00
parent 3e8f363dc5
commit 91262d9876
5 changed files with 19 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
RST_DOCS_DIR=docs/rst
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: clean clean-test clean-pyc clean-build docs help \
dev/bumpversion-path dev/bumpversion-minor dev/bumpversion-major
.DEFAULT_GOAL := help
@@ -46,10 +47,19 @@ docs: ## generate Sphinx HTML documentation, including API docs
$(MAKE) -C $(RST_DOCS_DIR) clean
$(MAKE) -C $(RST_DOCS_DIR) html
release: dist ## package and upload a release
dev/bumpversion-patch:
bumpversion --verbose patch
dev/bumpversion-minor:
bumpversion --verbose minor
dev/bumpversion-major:
bumpversion --verbose major
dev/release: dist ## package and upload a release
twine upload dist/*
dist: clean ## builds source and wheel package
dev/dist: clean ## builds source and wheel package
python setup.py sdist
python setup.py bdist_wheel
ls -l dist

View File

@@ -0,0 +1 @@
__version__ = '0.1.0'

View File

@@ -1,4 +1,3 @@
# TODO(alikins): remove bumpverion if we dont use it
bumpversion
Sphinx
wheel

View File

@@ -11,6 +11,10 @@ replace = version='{new_version}'
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bumpversion:file:ansible_galaxy/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bdist_wheel]
universal = 1

View File

@@ -4,7 +4,6 @@
"""The setup script."""
from setuptools import setup, find_packages
import ansible_galaxy_cli
with open('README.rst') as readme_file:
readme = readme_file.read()
@@ -54,6 +53,6 @@ setup(
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/ansible/galaxy-cli',
version=ansible_galaxy_cli.__version__,
version='0.1.0',
zip_safe=False,
)