-
Notifications
You must be signed in to change notification settings - Fork 1
/
clean.sh
43 lines (33 loc) · 903 Bytes
/
clean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DIR=$PWD
echo ""
echo "Cleaning project"
echo ""
# Clean linear MQTT dashboard settings
echo "Cleaning UI configuration..."
cd mobile/linearmqtt/
sh reset.sh
cd $DIR
# Clean mock directory
echo "Cleaning mock directory..."
MOCK_DIR="mock";
#echo "Mock dir: $MOCK_DIR"
if [ -d "$MOCK_DIR" ]; then
rm "$MOCK_DIR/" -r
fi
if [ -d "_tmp" ]; then
rm "_tmp" -r
fi
# Note: This is commented out because it messes with CI
# Disable mocking
#echo "Disabling mocking..."
#sh disable-mocking.sh
# Remove all garden devices and services
echo "Removing all garden devices..."
sh remove-garden-devices.sh || exit 1
# Reset the MQTT details
echo "Resettings MQTT credentials..."
sh set-mqtt-credentials.sh 127.0.0.1 user pass123 1883 || exit 1
# Reset the MQTT details
echo "Resettings email details..."
sh set-email-details.sh mail.example.com user@example.com || exit 1
echo "Finished cleaning project"