Skip to content

Commit

Permalink
chore(make): fix default answers in dev_clean_up
Browse files Browse the repository at this point in the history
  • Loading branch information
aconfetti-tw committed Jul 5, 2019
1 parent 9fd2973 commit a9ebe46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
10 changes: 8 additions & 2 deletions .make/development/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
set -e;

read -e -p "This will delete all your local byor-voting-server data, if any... are you sure to continue? [y/N] " response;
if [[ "${response:-n}" =~ [nN](es)* ]]; then
echo "Aborting on user choice"
exit 1;
fi

/bin/bash .make/utils/execute-in-docker.sh \
-d "rm" \
-o "-v -s -f"
Expand All @@ -10,14 +16,14 @@ set -e;
-o "-v"

read -e -p "Do you also want to remove node modules folder? [Y/n] " response;
if [[ ${response} == y ]]; then
if [[ "${response:-y}" =~ [yY](es)* ]]; then
echo "Removing all installed node modules..."
rm -rf node_modules
echo "...done"
fi

read -e -p "Do you also want to remove all unused containers, volumes, networks and images (both dangling and unreferenced)? [y/N] " response;
if [[ ${response} == y ]]; then
if [[ "${response:-n}" =~ [yY](es)* ]]; then
echo "Removing all unused containers, volumes, networks and images..."
docker system prune --volumes -f
echo "...done"
Expand Down
28 changes: 7 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a9ebe46

Please sign in to comment.