Skip to content

Commit bbef0c5

Browse files
Better instructions on how to reset persistent state in development environment (#2390)
* Better instructions on how to reset persistent state in development environment Co-authored-by: Niklas Mohrin <dev@niklasmohrin.de>
1 parent b8bdd9e commit bbef0c5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ We use [nix](https://nixos.org/) to manage the development environment.
3737
To stop EvaP or the background services, press `Ctrl-C`.
3838
To exit the development shell, press `Ctrl-D` or type `exit`.
3939

40+
Inside the development shell, after quitting the background services, you can run the command `clean-setup` to remove persistent state (database, node modules, localsettings).
41+
Afterwards, `nix run .#services-full` will recreate a default development environment on startup.
42+
4043
## Contributing
4144

4245
We'd love to see contributions! PRs solving existing issues are most helpful to us. It's best if you ask to be assigned for the issue so we won't have multiple people working on the same issue. Feel free to open issues for bugs, setup problems, or feature requests. If you have other questions, feel free to contact the [organization members](https://github.com/orgs/e-valuation/people). You should probably branch off `main`, the branch `release` is used for stable revisions.

nix/services.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
CUR_HASH=$(nix-hash --flat ./package.json ./package-lock.json | paste -sd " ")
4343
echo "Hash is $CUR_HASH"
4444
if [[ -f node_modules/evap-hash && "$CUR_HASH" == "$(cat node_modules/evap-hash)" ]]; then
45-
echo "Equal hash found, exiting"
45+
echo "Equal node_modules/evap-hash found, exiting."
46+
echo "If you want to install a fresh environment, run clean-setup in a nix develop shell."
4647
exit 0
4748
fi
4849
npm ci
@@ -59,7 +60,8 @@
5960
text = ''
6061
set -e
6162
if [[ -f evap/localsettings.py ]]; then
62-
echo "Found evap/localsettings.py, exiting"
63+
echo "Found evap/localsettings.py, exiting."
64+
echo "If you want to install a fresh environment, run clean-setup in a nix develop shell."
6365
exit 0
6466
fi
6567
set -x

0 commit comments

Comments
 (0)