Skip to content

Commit 0af061a

Browse files
committed
Add semversion to Makefile
1 parent 18b2559 commit 0af061a

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ target/
6363
*.swp
6464
.ropeproject/
6565
*/.ropeproject/
66+
67+
.changes/next-release

Makefile

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,30 @@ check:
3838
dist:
3939
python3 setup.py sdist bdist_wheel
4040
python3 setup.py bdist_wheel
41+
42+
upload:
4143
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
42-
#twine upload --repository-url https://test.pypi.org/legacy/ dist/*
43-
#python3 setup.py sdist upload -r pypi
44-
#python3 setup.py bdist_wheel upload
4544

4645
docs:
4746
SPHINX_APIDOC_OPTIONS="members,undoc-members,show-inheritance,inherited-members" sphinx-apidoc -d 6 -e -f -o docs . *.py tests
4847
make -C docs clean html
4948

50-
prepare: clean test docs authors
51-
52-
release: clean check dist git
53-
5449
authors:
5550
git shortlog -e -s -n > AUTHORS
51+
52+
semver: semver-release semver-updates
53+
54+
semver-release:
55+
semversioner release
56+
57+
semver-updates:
58+
semversioner changelog > CHANGELOG.md
59+
$(eval CURRENT_VERSION = $(shell semversioner current-version))
60+
sed -i "s/^__version__.*/__version__ = \"$(CURRENT_VERSION)\"/" setup.py
61+
git add .changes setup.py CHANGELOG.md
62+
git commit -m "semverioner release updates" --no-verify
63+
git flow release start $(CURRENT_VERSION)
64+
git flow release finish $(CURRENT_VERSION)
65+
66+
prerelease: test docs authors
67+
release: semver clean build check dist upload git

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
ascii = codecs.lookup("ascii")
1414
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == "mbcs"))
1515

16-
VERSION = "0.3.2"
16+
__version__ = "0.3.2"
1717
URL = "https://github.com/bitshares/python-bitshares"
1818

1919
setup(
2020
name="bitshares",
21-
version=VERSION,
21+
version=__version__,
2222
description="Python library for bitshares",
2323
long_description=open("README.md").read(),
24-
download_url="{}/tarball/{}".format(URL, VERSION),
24+
download_url="{}/tarball/{}".format(URL, __version__),
2525
author="Fabian Schuh",
2626
author_email="[email protected]",
2727
maintainer="Fabian Schuh",

0 commit comments

Comments
 (0)