Skip to content

Commit b4f6a73

Browse files
committed
Use the new macro variables to keeps docs up to date
Use the macros to properly set dependencies and the `cookiecutter` `--checkout` option. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 518c071 commit b4f6a73

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

docs/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Then simply run [Cookiecutter] where you want to create the new project:
3535

3636
```sh
3737
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
38-
--directory=cookiecutter --checkout v0.6.2
38+
--directory=cookiecutter{{" --checkout " + version.ref_name if version}}
3939
```
4040
4141
This command will prompt you for the project type, name, and other
@@ -50,9 +50,9 @@ subdirectory.
5050
the cookiecutter template that will be downloaded, and
5151
`--directory=cookiecutter` is needed because the cookiecutter template
5252
doesn't live at the top-level of that repository, but in a subdirectory
53-
called `cookiecutter`. The `--checkout` option is provided to use
53+
called `cookiecutter`.{{" The `--checkout` option is provided to use
5454
a template from a released version, otherwise the default (development)
55-
branch will be used.
55+
branch will be used." if version}}
5656
5757
All information about your project will be prompted interactively by that
5858
command.
@@ -242,7 +242,7 @@ the files in your existing project by using `rsync` or similar tools:
242242
```sh
243243
cd /tmp
244244
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
245-
--directory=cookiecutter --checkout v0.6.2
245+
--directory=cookiecutter{{(" --checkout " + version.ref_name) if version}}
246246
rsync -vr --exclude=.git/ new-project/ /path/to/existing/project
247247
cd /path/to/existing/project
248248
git diff
@@ -286,8 +286,8 @@ without having to enter all the inputs again.
286286
git commit -a # commit all changes
287287
cd ..
288288
cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
289-
--directory=cookiecutter \
290-
--checkout v0.6.2 \
289+
--directory=cookiecutter \{{ """
290+
--checkout """ + version.ref_name + " \\" if version}}
291291
--overwrite-if-exists \
292292
--replay \
293293
--replay-file project-directory/.cookiecutter-replay.json

src/frequenz/repo/config/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
# ...
290290
dev-pytest = [
291291
# ...
292-
"frequenz-repo-config[extra-lint-examples] == 0.6.2",
292+
"frequenz-repo-config[extra-lint-examples]{{version_requirement}}",
293293
]
294294
# ...
295295
[[tool.mypy.overrides]]
@@ -398,11 +398,12 @@
398398
Then you need to add this package as a build dependency and a few extra
399399
dependencies to your project, for example:
400400
401+
401402
```toml
402403
requires = [
403404
"setuptools >= 67.3.2, < 68",
404405
"setuptools_scm[toml] >= 7.1.0, < 8",
405-
"frequenz-repo-config[api] >= 0.6.2, < 0.7.0",
406+
"frequenz-repo-config[api]{{version_requirement}}",
406407
]
407408
build-backend = "setuptools.build_meta"
408409

0 commit comments

Comments
 (0)