1HATCH-GROW(1)                    User Commands                   HATCH-GROW(1)
2
3
4

NAME

6       hatch grow – Increments a project’s version
7

SYNOPSIS

9       hatch grow [OPTIONS] {major|minor|patch|fix|pre|build} [PACKAGE]
10

DESCRIPTION

12       Increments a project’s version number using semantic versioning.  Valid
13       choices for the part are major, minor,  patch  (fix  alias),  pre,  and
14       build.
15
16       The path to the project is derived in the following order:
17
18              1. The  optional argument, which should be the name of a package
19                 that was installed via hatch install -l or pip install -e.
20
21              2. The --local flag.
22
23              3. The option --path, which can be a relative or absolute path.
24
25              4. The current directory.
26
27       If the path is a file, it will be the target.  Otherwise, the path, and
28       every top level directory within, will be checked for a __version__.py,
29       __about__.py, and __init__.py, in that order.  The first encounter of a
30       __version__  variable  that also appears to equal a version string will
31       be updated.  Probable package paths will be given precedence.
32
33       The default tokens for the prerelease and build parts, rc and build re‐
34       spectively,  can  be  altered via the options --pre and --build, or the
35       config entry semver.
36

OPTIONS

38       -l, --local
39              Shortcut to select the only available local (editable)  package.
40              If there are multiple, an error will be raised.
41
42       -p, --path TEXT
43              A relative or absolute path to a project or file.
44
45       -pre TEXT
46              The  token to use for pre part, overriding the config file.  De‐
47              fault: rc
48
49       -build TEXT
50              The token to use for build part,  overriding  the  config  file.
51              Default: build
52
53       -h, --help
54              Show a help message and exit.
55

EXAMPLES

57              $ git clone -q https://github.com/requests/requests && cd requests
58              $ hatch grow build
59              Updated /home/ofek/requests/requests/__version__.py
60              2.18.4 -> 2.18.4+build.1
61              $ hatch grow fix
62              Updated /home/ofek/requests/requests/__version__.py
63              2.18.4+build.1 -> 2.18.5
64              $ hatch grow pre
65              Updated /home/ofek/requests/requests/__version__.py
66              2.18.5 -> 2.18.5-rc.1
67              $ hatch grow minor
68              Updated /home/ofek/requests/requests/__version__.py
69              2.18.5-rc.1 -> 2.19.0
70              $ hatch grow major
71              Updated /home/ofek/requests/requests/__version__.py
72              2.19.0 -> 3.0.0
73

SEE ALSO

75       hatch(1)
76
77       hatch-build(1),    hatch-clean(1),   hatch-conda(1),   hatch-config(1),
78       hatch-env(1), hatch-init(1), hatch-install(1), hatch-new(1),  hatch-py‐
79       path(1),      hatch-python(1),     hatch-release(1),     hatch-shed(1),
80       hatch-shell(1), hatch-test(1), hatch-uninstall(1), hatch-update(1)
81
82
83
84                                 Feburary 2022                   HATCH-GROW(1)
Impressum