forked from sanic-org/sanic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changelog.py
executable file
·60 lines (56 loc) · 1.4 KB
/
changelog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python
from os import path
import sys
if __name__ == "__main__":
try:
import towncrier
import click
except ImportError:
print(
"Please make sure you have a installed towncrier and click before using this tool"
)
sys.exit(1)
@click.command()
@click.option(
"--draft",
"draft",
default=False,
flag_value=True,
help="Render the news fragments, don't write to files, "
"don't check versions.",
)
@click.option(
"--dir", "directory", default=path.dirname(path.abspath(__file__))
)
@click.option("--name", "project_name", default=None)
@click.option(
"--version",
"project_version",
default=None,
help="Render the news fragments using given version.",
)
@click.option("--date", "project_date", default=None)
@click.option(
"--yes",
"answer_yes",
default=False,
flag_value=True,
help="Do not ask for confirmation to remove news fragments.",
)
def _main(
draft,
directory,
project_name,
project_version,
project_date,
answer_yes,
):
return towncrier.__main(
draft,
directory,
project_name,
project_version,
project_date,
answer_yes,
)
_main()