Skip to content

Commit

Permalink
Remove some old development scripts (#5070)
Browse files Browse the repository at this point in the history
# Motivation

Every now and then someone asks about using `dev-local.sh`. We don't use
this anymore so it's not maintained and doesn't work anymore.
Better to delete old scripts like that to avoid confusion.

# Changes

1. Delete `scripts/dev-local.sh`, `scripts/dev-local-state.sh`, and
`scripts/dev-testnet.sh`.
2. Update `README.md` files that were mentioning the scripts.

# Tests

not tested

# Todos

- [ ] Add entry to changelog (if necessary).
not necessary
  • Loading branch information
dskloetd authored Jun 19, 2024
1 parent 65685a1 commit 12870f2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 271 deletions.
24 changes: 8 additions & 16 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,15 @@ That is why we are providing a `./config.sh` script that generate the above envi

## Local

To run the dapp against canisters deployed locally on a simulated IC network, use the steps below, or run `./scripts/dev-local.sh` which guides you through these steps

- Make sure you have a clean local replica running with `dfx start --clean`. This will stay running so use a separate terminal for this.
- Deploy the NNS back-end canisters locally with `dfx nns install`
- From the last line of output of `dfx nns install` note down the value URL for `nns-dapp`
To run the dapp against canisters deployed locally on a simulated IC network, use the steps below:

- Clone the [snsdemo](https://github.com/dfinity/snsdemo/) repository. We'll use it to set up the test environment.
- In the `snsdemo` repo, run:
- `bin/dfx-sns-demo-install` (to install necessary tools)
- `bin/dfx-snapshot-stock-make --snapshot $HOME/my-snapshot.tar.xz` (to create a snapshot with a test environment)
- Go back to the `nns-dapp` repo
- Run `scripts/dfx-snapshot-start --snapshot $HOME/my-snapshot.tar.xz` (this will keep running so switch to another terminal window)
- Run `DFX_NETWORK=local ./config.sh` to populate the `./frontend/.env` file.
- Manually edit the `./frontend/.env` and replace `null` with the nns-dapp canister id from the URL you noted down before.
- Create a file called `canister_ids.json` in `./dfx/local/` with the following content (and make sure to replace the id:

```
{
"nns-dapp": {
"local": "<the id from the URL from the output of 'dfx nns install'>"
}
}
```

- In the `./frontend/` folder, first run `npm ci` and then `npm run dev` to serve the application.

With this setup, you can work on the frontend code without building the
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ project. The environment that we run against on CI is created by
in the snsdemo repository. After setting up the environment, it creates a
snapshot of the replica state, which is then used for CI by the nns-dapp repo.

You can run locally with such a snapshot by using `scripts/dev-local-state.sh`.
However, on Mac environments, this only seems to work if the snapshot was created
on the same machine.
You can run locally with such a snapshot by using `scripts/dfx-snapshot-start`.
However, this only seems to work if the snapshot was created on the same
machine.


# Debugging
Expand Down
93 changes: 0 additions & 93 deletions scripts/dev-local-state.sh

This file was deleted.

84 changes: 0 additions & 84 deletions scripts/dev-local.sh

This file was deleted.

75 changes: 0 additions & 75 deletions scripts/dev-testnet.sh

This file was deleted.

0 comments on commit 12870f2

Please sign in to comment.