Skip to content

Commit

Permalink
Improve section on testing a script in the README
Browse files Browse the repository at this point in the history
- Use single script run
- Improve instructions regarding comet-upgrade repository directory
  • Loading branch information
johnnyomair committed Nov 21, 2024
1 parent 965b331 commit 3ebcaa4
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,16 @@ npx @comet/upgrade v7/hide-graphql-field-suggestions.ts
cd project-you-want-to-upgrade/
```

Create a new branch to test the script:
Run the upgrade script. Replace `<path-to-comet-upgrade-repository>` with the location of the cloned comet-upgrade repository (e.g., `../comet-upgrade/`):

```sh
git checkout -b upgrade-comet-to-4
```

Execute the local @comet/upgrade binary:

```sh
../comet-upgrade/bin/index.js 4 # comet-upgrade directory
<path-to-comet-upgrade-repository>/bin/index.js v4/change-something.ts
```

Verify the changes in your project. If something is not as expected, adapt the upgrade script accordingly and then run it again on a clean state:

```sh
git reset --hard HEAD
../comet-upgrade/bin/index.js 4
<path-to-comet-upgrade-repository>/bin/index.js v4/change-something.ts
```

0 comments on commit 3ebcaa4

Please sign in to comment.