Skip to content

Commit 5aedd64

Browse files
committed
Updated documentation
1 parent dfdf23e commit 5aedd64

25 files changed

+1071
-980
lines changed

docs/assets/explanations.jpg

154 KB
Loading

docs/assets/how-to.jpg

171 KB
Loading

docs/assets/reference.jpg

185 KB
Loading

docs/assets/tutorial.jpg

150 KB
Loading

docs/explanation/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Explanation
1+
- *.md
File renamed without changes.

docs/reference/version-parts.md docs/explanation/version-parts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version parts
1+
# Version components
22

33
- The version string is the rendering of some or all version parts.
44
- While the version string may be rendered differently in various places, the value for all parts is maintained in Bump My Version's configuration.

docs/gen_doc_stubs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@
4747

4848
mkdocs_gen_files.set_edit_path(full_doc_path, path)
4949

50-
with mkdocs_gen_files.open("reference/api/SUMMARY.md", "w") as nav_file:
50+
with mkdocs_gen_files.open("reference/api/nav.md", "w") as nav_file:
5151
nav_file.writelines(nav.build_literate_nav())

docs/howtos/avoid-incorrect-replacements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Avoiding incorrect replacements
1+
# Avoid incorrect replacements
22

33
In files that have multiple version strings, Bump My Version may find the wrong string and replace it. Given this `requirements.txt` for `MyProject`:
44

docs/howtos/calver.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ For this example, we will use the following format: `YYYY.MM.DD.patch`. It will
77
- `2022.2.1` for the first patch of February 1, 2022
88
- `2022.2.1.1` for the second patch of February 1, 2022
99

10-
1110
## Initial configuration
1211

1312
```toml title=".bumpversion.toml"
@@ -31,7 +30,12 @@ You can look up the regular expressions for the CalVer format in the [CalVer ref
3130

3231
## Expected behavior
3332

34-
You can find out more about the logic behind the CalVer incrementing in the [CalVer reference](../reference/calver_reference.md#calver-incrementing-logic).
33+
- CalVer version components are marked as `always_increment` by default.
34+
- When bumping a version, you specify which component to increment. It is called the target component.
35+
- When bumping a version, the components marked as `always_increment` are incremented first.
36+
- If an `always_increment` component's value changed, its dependent components are marked for reset to their default values.
37+
- If the target component is in the set of components marked for reset, the target component is reset to its default value.
38+
- If the target component is not in the set of components marked for reset, the target component is incremented and its dependent components are reset to their default values.
3539

3640
### Bumping the release resets the patch part
3741

docs/index.md

+53-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,56 @@ title: Bump My Version
55

66
# Bump My Version
77

8-
{%
9-
include-markdown
10-
"../README.md"
11-
start="<!--start-->"
12-
end="<!--end-->"
13-
rewrite-relative-urls=false
14-
%}
8+
::: grid wide-gap
9+
10+
::: card-container
11+
12+
::: card-media
13+
14+
![Tutorials](assets/tutorial.jpg)
15+
16+
::: card-content
17+
18+
[Tutorials](tutorials/getting-started.md)
19+
{ .card-content-title }
20+
21+
Follow along with our guides to learn how to use Bump My Version.
22+
23+
::: card-container
24+
25+
::: card-media
26+
27+
![Reference](assets/reference.jpg)
28+
29+
::: card-content
30+
31+
[Reference](reference/index.md)
32+
{ .card-content-title }
33+
34+
Consult the reference for specifics about the Bump My Version's configuration and commands.
35+
36+
::: card-container
37+
38+
::: card-media
39+
40+
![How-To's](assets/how-to.jpg)
41+
42+
::: card-content
43+
44+
[How-To's](howtos/index.md)
45+
{ .card-content-title }
46+
47+
Need to get something done? Check out our how-to guides.
48+
49+
::: card-container
50+
51+
::: card-media
52+
53+
![Explanations](assets/explanations.jpg)
54+
55+
::: card-content
56+
57+
[Explanations](explanation/index.md)
58+
{ .card-content-title }
59+
60+
Want to understand the library better? Read our explanations behind the design.

docs/reference/calver_reference.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Calendar versioning codes
44

5-
The following table lists the available format codes for calendar versioning (CalVer) schemes. The codes can be used to define the version format in the `calver_format` configuration options. Formatting codes, surrounded by `{ }` can be combined to create a custom version format. For example, the format `YYYY.MM.DD` can be defined as `"{YYYY}.{MM}.{DD}"`.
5+
The following table lists the available format codes for calendar versioning (CalVer) schemes. The codes can be used to
6+
define the version format in the `calver_format` configuration options. Formatting codes, surrounded by `{ }` can be
7+
combined to create a custom version format. For example, the format `YYYY.MM.DD` can be defined as `"{YYYY}.{MM}.{DD}"`.
68

79
| Code | Example(s) | Comment |
810
|--------|---------------------|-----------------------------------------------|
@@ -32,7 +34,6 @@ The following table lists the available format codes for calendar versioning (Ca
3234
calver_format = "{YYYY}.{MM}.{DD}"
3335
```
3436

35-
3637
## Parsing CalVer versions
3738

3839
Using the following chart, we can set up the version parsing:
@@ -68,7 +69,9 @@ Using the following chart, we can set up the version parsing:
6869

6970
`(?:jan|fév|mar|avr|mai|jui|jui|aoû|sep|oct|nov|déc)` for French
7071

71-
You can use these regular expressions to parse CalVer versions in your project. For example, the following `parse` configuration can be used to parse a version string in the format `YYYY.MM.DD` as the `release` part of the version string:
72+
You can use these regular expressions to parse CalVer versions in your project. For example, the following `parse`
73+
configuration can be used to parse a version string in the format `YYYY.MM.DD` as the `release` part of the version
74+
string:
7275

7376
```toml
7477
[tool.bumpversion]
@@ -80,12 +83,3 @@ parse = """(?x) # Verbose mode
8083
)
8184
"""
8285
```
83-
84-
## CalVer incrementing logic
85-
86-
- CalVer version components are marked as `always_increment` by default.
87-
- When bumping a version, you specify which component to increment. It is called the target component.
88-
- When bumping a version, the components marked as `always_increment` are incremented first.
89-
- If an `always_increment` component's value changed, its dependent components are marked for reset to their default values.
90-
- If the target component is in the set of components marked for reset, the target component is reset to its default value.
91-
- If the target component is not in the set of components marked for reset, the target component is incremented and its dependent components are reset to their default values.

0 commit comments

Comments
 (0)