Skip to content

Commit 3fc1a3b

Browse files
authored
Add notes to the upgrading section and a comment that the script finished (#358)
This PR introduces tips on how to run the migrate script as a MacOS user and adds a comment at the end of the script execution to let the user know that the migration finished and ran through. Fixes #353, #354
2 parents 6aaa39d + 374985b commit 3fc1a3b

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/cookiecutter-migrate.template.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def main() -> None:
3232
"""Run the migration steps."""
3333
# Add a separation line like this one after each migration step.
3434
print("=" * 72)
35+
print("Migration script finished. Remember to follow any manual instructions.")
36+
print("=" * 72)
3537

3638

3739
def apply_patch(patch_content: str) -> None:

cookiecutter/migrate.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def main() -> None:
3232
"""Run the migration steps."""
3333
# Add a separation line like this one after each migration step.
3434
print("=" * 72)
35+
print("Migration script finished. Remember to follow any manual instructions.")
36+
print("=" * 72)
3537

3638

3739
def apply_patch(patch_content: str) -> None:

docs/user-guide/update-an-existing-project.md

+24
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-
2929
Make sure that the version (`{{ ref_name }}`) matches the
3030
target version you are migrating to.
3131

32+
!!! Tip "Tip for MacOS users"
33+
34+
The migration script may not work out of the box on macOS. You need to
35+
install `coreutils` to ensure compatibility:
36+
37+
```sh
38+
brew install coreutils gnu-sed
39+
```
40+
41+
After installation, update your `PATH` in your shell configuration
42+
(e.g. ~/.zshrc) so that the system uses the GNU versions. Depending on
43+
where the packages are installed this might look like this:
44+
45+
```sh
46+
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
47+
export MANPATH="/opt/homebrew/opt/coreutils/libexec/gnuman:$MANPATH"
48+
```
49+
50+
Then, source your configuration file again to apply the changes:
51+
52+
```sh
53+
source ~/.zshrc # or ~/.bashrc, depending on your shell
54+
```
55+
3256
## Re-run the Cookiecutter command
3357

3458
If you are upgrading a very old project (jumping multiple versions at the time)

0 commit comments

Comments
 (0)