diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000000..941d096c40 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,22 @@ +[bumpversion] +current_version = 4.0.0-beta.1 +commit = True +tag = True +parse = (?P\d+)\.(?P\d+)\.(?P\d+)(-(?P[^.]*)\.(?P\d+))? +serialize = + {major}.{minor}.{patch}-{stage}.{devnum} + {major}.{minor}.{patch} + +[bumpversion:part:stage] +optional_value = stable +first_value = stable +values = + alpha + beta + stable + +[bumpversion:part:devnum] + +[bumpversion:file:setup.py] +search= version='{current_version}', +replace= version='{new_version}', diff --git a/README.md b/README.md index 09aca47afc..189abedf32 100644 --- a/README.md +++ b/README.md @@ -176,4 +176,23 @@ For Debian-like systems: apt install pandoc ``` -*TODO* other release instructions +To release a new version: + +```sh +bumpversion $$VERSION_PART_TO_BUMP$$ +git push && git push --tags +make release +``` + +#### How to bumpversion + +The version format for this repo is `{major}.{minor}.{patch}` for stable, and +`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta). + +To issue the next version in line, use bumpversion and specify which part to bump, +like `bumpversion minor` or `bumpversion devnum`. + +If you are in a beta version, `bumpversion stage` will switch to a stable. + +To issue an unstable version when the current version is stable, specify the +new version explicitly, like `bumpversion --new-version 4.0.0-alpha.1 devnum` diff --git a/requirements-dev.txt b/requirements-dev.txt index 793806f070..3ed05aff80 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ +bumpversion eth-testrpc>=1.3.3 ethereum>=1.6.1,<2.0 flaky>=3.3.0 diff --git a/setup.py b/setup.py index c73fcd7da4..f009e1309f 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,7 @@ setup( name='web3', + # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility. version='4.0.0-beta.1', description="""Web3.py""", long_description_markdown_filename='README.md',