reference markdown format

This commit is contained in:
Matt Davis
2023-09-07 10:48:40 -04:00
parent 4a85f0b7b8
commit 30e0fa7309
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
include LICENSE README.md CONTRIBUTING.md CHANGELOG.rst NOTICES HISTORY.txt
include LICENSE README.md CONTRIBUTING.md CHANGELOG.md NOTICES HISTORY.txt
include Makefile pyproject.toml get-pipenv.py *.yml
include examples/Pipfil*
include *.md
+1 -1
View File
@@ -234,7 +234,7 @@ mypy_path = "typeshed/pyi:typeshed/imports"
[tool.towncrier]
package = "pipenv"
filename = "CHANGELOG.rst"
filename = "CHANGELOG.md"
issue_format = "`#{issue} <https://github.com/pypa/pipenv/issues/{issue}>`_"
directory = "news/"
title_format = "{version} ({project_date})"
+9 -9
View File
@@ -96,21 +96,21 @@ def release(
)
tag_content = _render_log()
if dry_run:
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
ctx.run("towncrier --draft > CHANGELOG.draft.md")
log("would remove: news/*")
log("would remove: CHANGELOG.draft.rst")
log("would remove: CHANGELOG.draft.md")
log("would update: pipenv/pipenv.1")
log(f'Would commit with message: "Release v{version}"')
else:
if pre:
log("generating towncrier draft...")
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
ctx.run("towncrier --draft > CHANGELOG.draft.md")
ctx.run(f"git add {get_version_file(ctx).as_posix()}")
else:
ctx.run("towncrier")
ctx.run(f"git add CHANGELOG.rst news/ {get_version_file(ctx).as_posix()}")
ctx.run(f"git add CHANGELOG.md news/ {get_version_file(ctx).as_posix()}")
log("removing changelog draft if present")
draft_changelog = pathlib.Path("CHANGELOG.draft.rst")
draft_changelog = pathlib.Path("CHANGELOG.draft.md")
if draft_changelog.exists():
draft_changelog.unlink()
log("generating man files...")
@@ -188,7 +188,7 @@ def upload_dists(ctx, repo="pypi"):
def generate_markdown(ctx, source_rstfile=None):
log("Generating markdown from changelog...")
if source_rstfile is None:
source_rstfile = "CHANGELOG.rst"
source_rstfile = "CHANGELOG.md"
source_file = pathlib.Path(source_rstfile)
dest_file = source_file.with_suffix(".md")
ctx.run(
@@ -223,13 +223,13 @@ def generate_changelog(ctx, commit=False, draft=False):
if draft:
commit = False
log("Writing draft to file...")
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
ctx.run("towncrier --draft > CHANGELOG.draft.md")
else:
ctx.run("towncrier")
if commit:
log("Committing...")
ctx.run("git add CHANGELOG.rst")
ctx.run("git rm CHANGELOG.draft.rst")
ctx.run("git add CHANGELOG.md")
ctx.run("git rm CHANGELOG.draft.md")
ctx.run('git commit -m "Update changelog."')