@@ -35,7 +35,7 @@ Then simply run [Cookiecutter] where you want to create the new project:
3535
3636``` sh
3737cookiecutter 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
4141This 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
243243cd /tmp
244244cookiecutter gh:frequenz-floss/frequenz-repo-config-python \
245- --directory=cookiecutter --checkout v0.6.2
245+ --directory=cookiecutter{{(" --checkout " + version.ref_name) if version}}
246246rsync -vr --exclude=.git/ new-project/ /path/to/existing/project
247247cd /path/to/existing/project
248248git diff
@@ -286,8 +286,8 @@ without having to enter all the inputs again.
286286git commit -a # commit all changes
287287cd ..
288288cookiecutter 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
0 commit comments