Created
March 1, 2019 20:42
-
-
Save acoomans/d7e57d4eacb287f6ec3eaac830188cf2 to your computer and use it in GitHub Desktop.
Development scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# search remote branches for a pattern | |
GREP_PATTERNS=$@ | |
if [ -z "$GREP_PATTERNS" ] ; then | |
echo "Need a term to search for, like a diff number." | |
exit 1 | |
fi | |
BRANCH_PATTERN="refs/heads/release-" | |
BRANCH_N=3 | |
git fetch | |
#--- Find recent branches | |
BRANCHES=`git ls-remote origin | grep "$BRANCH_PATTERN" | cut -f 2 | sort --version-sort | tail -n 3 | cut -d/ -f $BRANCH_N` | |
for BRANCH in $BRANCHES ; do | |
git fetch origin $BRANCH:$BRANCH | |
echo -e "\033[33m$BRANCH\033[0m" | |
for GREP_PATTERN in $GREP_PATTERNS ; do | |
YN=`git log --grep="$GREP_PATTERN" $BRANCH` | |
if [ -z "$YN" ] ; then | |
echo -e "$GREP_PATTERN - \033[31mno\033[0m" | |
else | |
echo -e "$GREP_PATTERN - \033[32myes\033[0m" | |
fi | |
done | |
git branch -D $BRANCH | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e -x | |
rm -fr ~/Library/Developer/Xcode/DerivedData/* | |
rm -fr buck-out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e -x | |
UUID_REGEX='s/^.*\([0-9A-Z]\{8\}-[0-9A-Z]\{4\}-[0-9A-Z]\{4\}-[0-9A-Z]\{4\}-[0-9A-Z]\{12\}\).*$/\1/p' | |
xcrun simctl shutdown all | |
xcrun simctl delete unavailable | |
xcrun simctl list devices | sed -n $UUID_REGEX | xargs -I uuid xcrun simctl delete "uuid" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment