Skip to content

Commit

Permalink
fix version and release check
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Dec 20, 2020
1 parent b358462 commit 1a3127f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .ci/release_check.py → .ci/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

# make sure that changelog was updated
with open(changelog_fn) as f:
assert version in f.read()
assert version in f.read(), "changelog entry missing"

# make sure that version is not already tagged
tags = subp.check_output(["git", "tag"]).decode().strip().split("\n")
assert version not in tags
assert f"v{version}" not in tags, "tag exists"

# make sure that version itself was updated
r = requests.get("https://pypi.org/pypi/iminuit/json")
releases = r.json()["releases"]
pypi_versions = [parse_version(v) for v in releases]
this_version = parse_version(version)
assert this_version not in pypi_versions
assert this_version not in pypi_versions, "pypi version exists"
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r requirements-dev.txt
- run: pre-commit run -a
# -e is required here to track coverage properly
- run: python -m pip install -e .
- run: coverage run -m pytest
- uses: AndreMiras/coveralls-python-action@develop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Version
name: pre-commit

on:
pull_request:
Expand All @@ -12,5 +12,6 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: python -m pip install requests
- run: python .ci/release_check.py
- run: python -m pip install --upgrade pip wheel
- run: python -m pip install pre-commit
- run: pre-commit run -a
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
name: version-check
language: python
additional_dependencies: [requests]
entry: python .ci/release_check.py
entry: python .ci/version_check.py

# Python linter (Flake8)
- repo: https://gitlab.com/pycqa/flake8
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Changelog
=========

2.2.0.rc1
2.2.0.rc2
---------

New features
Expand Down
2 changes: 1 addition & 1 deletion src/iminuit/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.0.rc1"
__version__ = "2.2.0.rc2"

0 comments on commit 1a3127f

Please sign in to comment.