Skip to content

Commit

Permalink
global: init autosemver
Browse files Browse the repository at this point in the history
  • Loading branch information
drjova committed Oct 13, 2021
1 parent bff82bd commit 8296cbb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-and-release.yml
Expand Up @@ -14,15 +14,14 @@ jobs:
strategy:
matrix:
python-version: [2.7, 3.6]

steps:
- name: Checkout
uses: actions/checkout@v2
with:
python-version: ${{ matrix.python-version }}
fetch-depth: 0

- name: Set up Python 2.7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -32,16 +31,20 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools twine wheel coveralls
pip install -e .[all]
- name: Show python dependencies
run: |
pip freeze
- name: Run tests
run: |
./run-tests.sh
- name: Build package
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '3.6' }}
run: |
python setup.py sdist bdist_wheel
- name: Publish package
if: ${{ success() && github.event_name == 'push' && matrix.python-version == '3.6' }}
uses: pypa/gh-action-pypi-publish@v1.3.1
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -60,3 +60,5 @@ docs/_build/

# PyBuilder
target/

.python-version
4 changes: 3 additions & 1 deletion json_merger/version.py
Expand Up @@ -30,4 +30,6 @@

from __future__ import absolute_import, print_function

__version__ = "0.7.6"
from autosemver.packaging import get_current_version

__version__ = get_current_version(project_name="json-merger")
13 changes: 6 additions & 7 deletions setup.py
Expand Up @@ -66,21 +66,19 @@
install_requires = [
'dictdiffer==0.8.1' if sys.version_info < (3, 6) else 'dictdiffer>=0.6.0',
'six>=1.10.0',
"autosemver==0.5.5",
'pyrsistent>=0.11.13'
]

packages = find_packages()


# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join('json_merger', 'version.py'), 'rt') as fp:
exec(fp.read(), g)
version = g['__version__']
setup_require = [
"autosemver==0.5.5"
]

setup(
name='json-merger',
version=version,
autosemver=True,
description=__doc__,
long_description=readme + '\n\n' + history,
keywords='JSON patch merge conflict',
Expand All @@ -94,6 +92,7 @@
platforms='any',
entry_points={
},
setup_requires=setup_require,
extras_require=extras_require,
install_requires=install_requires,
classifiers=[
Expand Down

0 comments on commit 8296cbb

Please sign in to comment.