Skip to content

Commit

Permalink
fix(migration): update --no-demo scenario #161
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Jul 9, 2021
1 parent 9129a54 commit 27cedd4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions util/auroMigrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,22 @@ This function takes up to three arguments in this order:
1. Path to the newly created directory `{ String }`
1. `--no-demo` flag `{ Boolean }`

For example. Migrating from a legacy repo, `flight`, assuming that both repos are in the same root directory, and the new repo is named `auro-flight`, the command would be the following:
For obvious reasons, you cannot have two directories named the same. The migration command accepts any directory path, e.g. if the newly creates repo was in a sub-directory from where the legacy repo is, the command could be the following:

```
$ auroMigrate flight auro-flight
$ auroMigrate auro-flight migration/auro-flight
```

If you **do not** intend to migrate the `./demo` directory, add the `--no-demo` flag.
Or if the new repo was outside the current directory

```
$ auroMigrate flight auro-flight --no-demo
$ auroMigrate auro-flight ../auro-flight
```

If the repo you are migrating from does not have a modern markdown demo in the `./demo` directory, please add the `--no-demo` flag.

```
$ auroMigrate auroMigrate auro-flight migration/auro-flight --no-demo
```

## Review and test the migration
Expand Down
3 changes: 2 additions & 1 deletion util/auroMigrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function auroMigrate {

# check for --no-demo
if [[ $3 = "--no-demo" ]]; then
echo -e "${RED}7.${NC} ./demo directory was ${RED}NOT${NC} copied\n"
command cp "$1"/demo/index.html "$2"/demo/index.legacy
echo -e "${RED}7.${NC} the file ${RED}`$1/demo/index.html`${NC} was moved to ${RED}`$2/demo/index.legacy${NC}`\n"
sleep 3
else
command cp "$1"/demo/demo.md "$2"/demo/demo.md
Expand Down

0 comments on commit 27cedd4

Please sign in to comment.