Skip to content

Commit 61a0ce2

Browse files
committed
fix release task and fix documentation for 3.5.0
1 parent 5f2535f commit 61a0ce2

File tree

5 files changed

+41
-36
lines changed

5 files changed

+41
-36
lines changed

changelog.rst

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/changelog.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,35 @@ with advance notice in the **Deprecations** section of releases.
1111

1212
.. towncrier release notes start
1313
14+
v3.5.0 (2018-10-08)
15+
-------------------
16+
17+
Bugfixes
18+
^^^^^^^^
19+
20+
- intermittent failures with ``--parallel--safe-build``, instead of mangling with the file paths now uses a lock to make the package build operation thread safe and is now on by default (``--parallel--safe-build`` is now deprecated) - by :user:`gaborbernat` (`#1026 <https://github.com/tox-dev/tox/issues/1026>`_)
21+
22+
23+
Features
24+
^^^^^^^^
25+
26+
- Added ``temp_dir`` folder configuration (defaults to ``{toxworkdir}/.tmp``) that contains tox
27+
temporary files. Package builds now create a hard link (if possible, otherwise copy - notably in
28+
case of Windows Python 2.7) to the built file, and feed that file downstream (e.g. for pip to
29+
install it). The hard link is removed at the end of the run (what it points though is kept
30+
inside ``distdir``). This ensures that a tox session operates on the same package it built, even
31+
if a parallel tox run builds another version. Note ``distdir`` will contain only the last built
32+
package in such cases. - by :user:`gaborbernat` (`#1026 <https://github.com/tox-dev/tox/issues/1026>`_)
33+
34+
35+
Documentation
36+
^^^^^^^^^^^^^
37+
38+
- document tox environment recreate rules (:ref:`recreate`) - by :user:`gaborbernat` (`#93 <https://github.com/tox-dev/tox/issues/93>`_)
39+
- document inside the ``--help`` how to disable colorized output via the ``PY_COLORS`` operating system environment variable - by :user:`gaborbernat` (`#163 <https://github.com/tox-dev/tox/issues/163>`_)
40+
- document all global tox flags and a more concise format to express default and type - by :user:`gaborbernat` (`#683 <https://github.com/tox-dev/tox/issues/683>`_)
41+
- document command line interface under the config section `cli <https://tox.readthedocs.io/en/latest/config.html?highlight=cli#cli>`_ - by :user:`gaborbernat` (`#829 <https://github.com/tox-dev/tox/issues/829>`_)
42+
1443
v3.4.0 (2018-09-20)
1544
-------------------
1645

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ build-backend = 'setuptools.build_meta'
88

99
[tool.towncrier]
1010
package = "tox"
11-
filename = "changelog.rst"
11+
filename = "docs/changelog.rst"
1212
directory = "docs/changelog"
1313
template = "docs/changelog/template.jinja2"
14-
title_format = "{version} ({project_date})"
14+
title_format = "v{version} ({project_date})"
1515
issue_format = "`#{issue} <https://github.com/tox-dev/tox/issues/{issue}>`_"
1616
underlines = ["-", "^"]
1717

tasks/release.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
"""Handles creating a release PR"""
3-
import sys
43
from pathlib import Path
54
from subprocess import check_call
65
from typing import Tuple
@@ -17,7 +16,6 @@ def main(version_str: str) -> None:
1716

1817
if repo.is_dirty():
1918
raise RuntimeError("Current repository is dirty. Please commit any changes and try again.")
20-
2119
upstream, release_branch = create_release_branch(repo, version)
2220
release_commit = release_changelog(repo, version)
2321
tag = tag_release_commit(release_commit, repo, version)
@@ -51,8 +49,8 @@ def get_upstream(repo: Repo) -> Remote:
5149
def release_changelog(repo: Repo, version: Version) -> Commit:
5250
print("generate release commit")
5351
check_call(["towncrier", "--yes", "--version", version.public], cwd=str(ROOT_SRC_DIR))
54-
changed = [item.a_path for item in repo.index.diff(None)]
55-
if any((not i.startswith("changelog") or i == "changelog.rst") for i in changed):
52+
changed = [item.a_path for item in repo.index.diff("HEAD")]
53+
if any(not i.startswith("docs/changelog") for i in changed):
5654
raise RuntimeError(f"found changes outside of the changelog domain: {changed}")
5755
repo.index.add(changed)
5856
release_commit = repo.index.commit(f"release {version}")
@@ -71,4 +69,9 @@ def tag_release_commit(release_commit, repo, version) -> TagReference:
7169

7270

7371
if __name__ == "__main__":
74-
main(sys.argv[1])
72+
import argparse
73+
74+
parser = argparse.ArgumentParser(prog="release")
75+
parser.add_argument("--version", required=True)
76+
options = parser.parse_args()
77+
main(options.version)

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ passenv = *
152152
deps = gitpython >= 2.1.10
153153
towncrier >= 18.5.0
154154
packaging >= 17.1
155-
commands = python {toxinidir}/tasks/release.py {posargs}
155+
skip_install = true
156+
commands = python {toxinidir}/tasks/release.py --version {posargs}
156157
157158
[testenv:notify]
158159
description = notify people about the release of the library

0 commit comments

Comments
 (0)