@@ -21,53 +21,11 @@ if [ "$updateTruths" = "y" ]; then
21
21
# New line
22
22
echo " "
23
23
24
- # Keep track of whether there are uncommitted changes
25
- hasUncommittedChanges=false
26
-
27
- # check if there are any uncommitted changes
28
- if [ -n " $( git status --porcelain) " ]; then
29
- # There are uncommitted changes
30
- hasUncommittedChanges=true
31
-
32
- # Inform the user that there are uncommitted changes
33
- echo " There are uncommitted changes in the current branch. Stashing the changes temporarily to avoid conflicts..."
34
-
35
- # New line
36
- echo " "
37
-
38
- # Stash the local changes
39
- git stash
40
- fi
41
-
42
- # Inform the user that the base branch is being updated
43
- echo " Updating the base branch..."
44
-
45
- # New line
46
- echo " "
47
-
48
24
# Check if the user provided a base branch
49
25
if [ -z " $baseBranch " ]; then
50
26
# Default base branch is main
51
27
baseBranch=" main"
52
28
fi
53
-
54
- # Update the base branch without checking out the branch
55
- git pull origin $baseBranch
56
-
57
- # New line
58
- echo " "
59
-
60
- # If there were uncommitted changes then pop the stash
61
- if [ " $hasUncommittedChanges " = true ]; then
62
- # Inform the user that the local changes are being popped
63
- echo " Popping local changes..."
64
-
65
- # New line
66
- echo " "
67
-
68
- # Pop the local changes
69
- git stash pop
70
- fi
71
29
fi
72
30
73
31
# inform the user that the core is being built
@@ -147,3 +105,13 @@ read -n 1 viewReport
147
105
if [ " $viewReport " = " y" ]; then
148
106
npx playwright show-report
149
107
fi
108
+
109
+ # Clean up the local ground truths
110
+ git reset -- src/** /* -linux.png
111
+ git restore -- src/** /* -linux.png
112
+
113
+ # New line
114
+ echo " "
115
+
116
+ # Inform the user that the script has finished running
117
+ echo " Script has finished running. Local ground truths have been restored to their original state in order to avoid committing them."
0 commit comments