-
-
Notifications
You must be signed in to change notification settings - Fork 158
/
upgrade-examples.sh
43 lines (32 loc) · 1.01 KB
/
upgrade-examples.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
#!/bin/bash
# Change directory to the example directory
cd apps/mantine-react-table-docs/examples
# Loop through each file in the example directory
for file in *; do
if [ -d "$file" ]; then
echo "Processing $file..."
# Change directory to the current file
cd "$file"
# Check if the sandbox file exists
if [ -f "sandbox/package.json" ]; then
echo " - Found sandbox/package.json"
echo " - Running npm install in sandbox..."
# Change directory to the sandbox directory
cd sandbox
## Update dependency versions
npx npm-check-updates -u
npx npm-check-updates -u mantine-react-table -t greatest
# Run npm install
npm install --package-lock-only --force
echo " - npm install completed"
# Change back to the example directory
cd ..
else
echo " - No sandbox/package.json found"
fi
# Change back to the parent directory of the current file
cd ..
echo "Completed processing $file"
echo
fi
done