Skip to content

Commit c07e26c

Browse files
authored
chore: clean script (#526)
# Summary Adds dev clean script
1 parent acdb79f commit c07e26c

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"lint-clang:android:fix": "find android/ \\( -iname \"*.h\" -o -iname \"*.cpp\" \\) | grep -v -e build -e generated | xargs npx clang-format -i",
6262
"lint-clang": "yarn lint-clang:ios && yarn lint-clang:android",
6363
"lint-clang:fix": "yarn lint-clang:ios:fix && yarn lint-clang:android:fix",
64-
"clean": "del-cli android/build apps/example/android/build apps/example/android/app/build apps/example/ios/build lib",
64+
"clean": "./scripts/git-clean.sh",
6565
"prepare": "bob build",
6666
"release": "release-it",
6767
"android-studio": "open -a 'Android Studio' apps/example/android",

scripts/git-clean.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
echo "Files that will be removed:"
4+
git clean -xfdn | sed 's/^Would remove //'
5+
6+
echo ""
7+
read -r -p "Proceed with git clean -xfd? [y/N] " confirm
8+
9+
if [[ "$confirm" =~ ^[Yy]$ ]]; then
10+
git clean -xfd
11+
else
12+
echo "Aborted."
13+
fi

0 commit comments

Comments
 (0)