File: bump-version.py

package info (click to toggle)
python-maison 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: python: 1,549; makefile: 9; sh: 5
file content (30 lines) | stat: -rw-r--r-- 849 bytes parent folder | download
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
"""Script responsible for bumping the version of the maison package."""

import argparse

from util import bump_version


def main() -> None:
    """Parses args and passes through to bump_version."""
    parser: argparse.ArgumentParser = get_parser()
    args: argparse.Namespace = parser.parse_args()
    bump_version(increment=args.increment)


def get_parser() -> argparse.ArgumentParser:
    """Creates the argument parser for prepare-release."""
    parser: argparse.ArgumentParser = argparse.ArgumentParser(
        prog="bump-version", usage="python ./scripts/bump-version.py patch"
    )
    parser.add_argument(
        "increment",
        type=str,
        help="Increment type to use when preparing the release.",
        choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"],
    )
    return parser


if __name__ == "__main__":
    main()