Skip to content

Commit

Permalink
reference markdown format
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Sep 7, 2023
1 parent 4a85f0b commit 30e0fa7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand Down
18 changes: 9 additions & 9 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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."')


Expand Down

0 comments on commit 30e0fa7

Please sign in to comment.