mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 06:46:15 +00:00
reference markdown format
This commit is contained in:
+1
-1
@@ -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 Makefile pyproject.toml get-pipenv.py *.yml
|
||||||
include examples/Pipfil*
|
include examples/Pipfil*
|
||||||
include *.md
|
include *.md
|
||||||
|
|||||||
+1
-1
@@ -234,7 +234,7 @@ mypy_path = "typeshed/pyi:typeshed/imports"
|
|||||||
|
|
||||||
[tool.towncrier]
|
[tool.towncrier]
|
||||||
package = "pipenv"
|
package = "pipenv"
|
||||||
filename = "CHANGELOG.rst"
|
filename = "CHANGELOG.md"
|
||||||
issue_format = "`#{issue} <https://github.com/pypa/pipenv/issues/{issue}>`_"
|
issue_format = "`#{issue} <https://github.com/pypa/pipenv/issues/{issue}>`_"
|
||||||
directory = "news/"
|
directory = "news/"
|
||||||
title_format = "{version} ({project_date})"
|
title_format = "{version} ({project_date})"
|
||||||
|
|||||||
+9
-9
@@ -96,21 +96,21 @@ def release(
|
|||||||
)
|
)
|
||||||
tag_content = _render_log()
|
tag_content = _render_log()
|
||||||
if dry_run:
|
if dry_run:
|
||||||
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
|
ctx.run("towncrier --draft > CHANGELOG.draft.md")
|
||||||
log("would remove: news/*")
|
log("would remove: news/*")
|
||||||
log("would remove: CHANGELOG.draft.rst")
|
log("would remove: CHANGELOG.draft.md")
|
||||||
log("would update: pipenv/pipenv.1")
|
log("would update: pipenv/pipenv.1")
|
||||||
log(f'Would commit with message: "Release v{version}"')
|
log(f'Would commit with message: "Release v{version}"')
|
||||||
else:
|
else:
|
||||||
if pre:
|
if pre:
|
||||||
log("generating towncrier draft...")
|
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()}")
|
ctx.run(f"git add {get_version_file(ctx).as_posix()}")
|
||||||
else:
|
else:
|
||||||
ctx.run("towncrier")
|
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")
|
log("removing changelog draft if present")
|
||||||
draft_changelog = pathlib.Path("CHANGELOG.draft.rst")
|
draft_changelog = pathlib.Path("CHANGELOG.draft.md")
|
||||||
if draft_changelog.exists():
|
if draft_changelog.exists():
|
||||||
draft_changelog.unlink()
|
draft_changelog.unlink()
|
||||||
log("generating man files...")
|
log("generating man files...")
|
||||||
@@ -188,7 +188,7 @@ def upload_dists(ctx, repo="pypi"):
|
|||||||
def generate_markdown(ctx, source_rstfile=None):
|
def generate_markdown(ctx, source_rstfile=None):
|
||||||
log("Generating markdown from changelog...")
|
log("Generating markdown from changelog...")
|
||||||
if source_rstfile is None:
|
if source_rstfile is None:
|
||||||
source_rstfile = "CHANGELOG.rst"
|
source_rstfile = "CHANGELOG.md"
|
||||||
source_file = pathlib.Path(source_rstfile)
|
source_file = pathlib.Path(source_rstfile)
|
||||||
dest_file = source_file.with_suffix(".md")
|
dest_file = source_file.with_suffix(".md")
|
||||||
ctx.run(
|
ctx.run(
|
||||||
@@ -223,13 +223,13 @@ def generate_changelog(ctx, commit=False, draft=False):
|
|||||||
if draft:
|
if draft:
|
||||||
commit = False
|
commit = False
|
||||||
log("Writing draft to file...")
|
log("Writing draft to file...")
|
||||||
ctx.run("towncrier --draft > CHANGELOG.draft.rst")
|
ctx.run("towncrier --draft > CHANGELOG.draft.md")
|
||||||
else:
|
else:
|
||||||
ctx.run("towncrier")
|
ctx.run("towncrier")
|
||||||
if commit:
|
if commit:
|
||||||
log("Committing...")
|
log("Committing...")
|
||||||
ctx.run("git add CHANGELOG.rst")
|
ctx.run("git add CHANGELOG.md")
|
||||||
ctx.run("git rm CHANGELOG.draft.rst")
|
ctx.run("git rm CHANGELOG.draft.md")
|
||||||
ctx.run('git commit -m "Update changelog."')
|
ctx.run('git commit -m "Update changelog."')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user