Skip to content

Commit

Permalink
Modernize release process
Browse files Browse the repository at this point in the history
  • Loading branch information
pipermerriam committed Dec 11, 2018
1 parent 97615f1 commit 1714718
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.0-alpha.0
current_version = 1.4.5
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\d+))?
Expand All @@ -19,4 +19,4 @@ values =

[bumpversion:file:setup.py]
search = version='{current_version}',
replace = version='{new_version}',
replace = version='{new_version}',
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ test-all:
tox

release: clean
python setup.py sdist bdist_wheel upload
CURRENT_SIGN_SETTING=$(git config commit.gpgSign)
git config commit.gpgSign true
bumpversion $(bump)
git push upstream && git push upstream --tags
python setup.py sdist bdist_wheel
twine upload dist/*
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"

dist: clean
python setup.py sdist bdist_wheel
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,25 @@ Feel free to create issue under https://github.com/ethereum/py_ecc/issues

## Copyright and Licensing
Project is licensed under the MIT license.


## Release setup

To release a new version:

```sh
make release bump=$$VERSION_PART_TO_BUMP$$
```

#### 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, specify which part to bump,
like `make release bump=minor` or `make release bump=devnum`.

If you are in a beta version, `make release bump=stage` will switch to a stable.

To issue an unstable version when the current version is stable, specify the
new version explicitly, like `make release bump="--new-version 4.0.0-alpha.1 devnum"`
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
"flake8==3.4.1",
"mypy==0.641",
],
'dev': [
"bumpversion>=0.5.3,<1",
'twine',
],
}


extras_require['dev'] = (
extras_require['dev'] +
extras_require['test'] +
extras_require['lint']
)
Expand All @@ -27,6 +32,7 @@

setup(
name='py_ecc',
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
version='1.4.5',
description='Elliptic curve crypto in python including secp256k1 and alt_bn128',
long_description=readme,
Expand Down

0 comments on commit 1714718

Please sign in to comment.