Skip to content

Commit fc480f2

Browse files
committed
docs: Use curl -f and python -I to run the migration script
This is to improve resilience and security. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 8664b48 commit fc480f2

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/cookiecutter-migrate.template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
To run it, the simplest way is to fetch it from GitHub and run it directly:
1212
13-
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3
13+
curl -sSLf https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3
1414
1515
Make sure to replace the `<tag>` to the version you want to migrate to in the URL.
1616

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
All upgrading should be done via the migration script or regenerating the templates.
1414

1515
```bash
16-
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3
16+
curl -sSLf https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3 -I
1717
```
1818

1919
But you might still need to adapt your code:

cookiecutter/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
To run it, the simplest way is to fetch it from GitHub and run it directly:
1212
13-
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3
13+
curl -sSLf https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/<tag>/cookiecutter/migrate.py | python3 -I
1414
1515
Make sure to replace the `<tag>` to the version you want to migrate to in the URL.
1616

docs/user-guide/update-to-a-new-version.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ The script can also only migrate from one version to the next. If you are
115115
skipping versions, you will have to run the script multiple times.
116116

117117
```sh
118-
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/{{ ref_name }}/cookiecutter/migrate.py \
119-
| python3
118+
curl -sSLf https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/{{ ref_name }}/cookiecutter/migrate.py \
119+
| python3 -I
120120
```
121121

122122
Make sure that the version (`{{ ref_name }}`) matches the

0 commit comments

Comments
 (0)