Skip to content

Commit 831581d

Browse files
committed
add explicit bump procedure for stac-model package
1 parent 9aa7e02 commit 831581d

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ git push -u origin your-branch
8888
### Building a new version of `stac-model`
8989

9090
- Apply any relevant changes and `CHANGELOG.md` entries in a PR that modifies `stac-model`.
91-
- Bump the version with `bumpversion bump <version>`.
91+
- Bump the version with `bump-my-version bump --verbose <version-level> --config-file stac-model.bump.toml`.
9292
- You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. <br>
9393
For more details, refer to the [Semantic Versions][semver] standard;
9494
- Once CI validation succeeded, merge the corresponding PR branch.
95-
- Checkout to `main` branch that contais the freshly created merge commit.
95+
- Checkout to `main` branch that contains the freshly created merge commit.
9696
- Push the tag `stac-model-v{MAJOR}.{MINOR}.{PATCH}`. The CI should auto-publish it to PyPI.
97-
- Create a `GitHub release`
97+
- Create a `GitHub release` (if not automatically drafted by the CI).
9898

9999
<!-- lint disable no-undefined-references -->
100100

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies = [
2424
"jsonschema<5.0.0,>=4.21.1",
2525
"pip>=25.0.0",
2626
]
27+
# important: leave the name and version together for bump resolution
2728
name = "stac-model"
2829
version = "0.2.0"
2930
description = "A PydanticV2 validation and serialization libary for the STAC ML Model Extension"
@@ -86,7 +87,7 @@ stac-model = "stac_model.__main__:app"
8687
# NOTE:
8788
# Although these definitions are provided in this 'stac-model' project file,
8889
# they are actually intented for versioning the MLM specification itself.
89-
# To version 'stac-model', use the 'bump-my-version bump' operation.
90+
# To version 'stac-model', use the 'bump-my-version bump' operation using the 'stac-model.bump.toml' file.
9091
# See also https://github.com/stac-extensions/mlm/blob/main/CONTRIBUTING.md#building-and-releasing
9192
current_version = "1.4.0"
9293
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"

stac-model.bump.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
[tool.bumpversion]
3+
# NOTE:
4+
# This is the bump definition for the 'stac-model' package.
5+
# For the MLM specification, refer to the main 'pyproject.toml'.
6+
# they are actually intented for versioning the MLM specification itself.
7+
# To version 'stac-model', use the 'bump-my-version bump' operation with this file.
8+
# See also https://github.com/stac-extensions/mlm/blob/main/CONTRIBUTING.md#building-and-releasing
9+
current_version = "0.2.0"
10+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
11+
serialize = ["{major}.{minor}.{patch}"]
12+
search = "{current_version}"
13+
replace = "{new_version}"
14+
regex = false
15+
ignore_missing_version = true
16+
ignore_missing_files = false
17+
tag = true
18+
sign_tags = false
19+
tag_name = "stac-model-v{new_version}"
20+
tag_message = "Bump version: stac-model {current_version} → {new_version}"
21+
allow_dirty = false
22+
commit = true
23+
commit_args = "--no-verify"
24+
message = "Bump version: stac-model {current_version} → {new_version}"
25+
26+
[[tool.bumpversion.files]]
27+
filename = "uv.lock"
28+
search = """
29+
name = "stac-model"
30+
version = "{current_version}"
31+
"""
32+
replace = """
33+
name = "stac-model"
34+
version = "{new_version}"
35+
"""
36+
37+
[[tool.bumpversion.files]]
38+
filename = "pyproject.toml"
39+
search = """
40+
name = "stac-model"
41+
version = "{current_version}"
42+
"""
43+
replace = """
44+
name = "stac-model"
45+
version = "{new_version}"
46+
"""
47+

0 commit comments

Comments
 (0)