-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ee5536
commit 70fd492
Showing
3 changed files
with
191 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
transforms=( | ||
"arrow" | ||
"for-of" | ||
"for-each" | ||
"arg-rest" | ||
"arg-spread" | ||
"obj-method" | ||
"obj-shorthand" | ||
"multi-var" | ||
"let" | ||
"template" | ||
"default-param" | ||
"destruct-param" | ||
"includes" | ||
) | ||
|
||
# don't want lebab to operate on these, too slow. | ||
|
||
for transform in "${transforms[@]}"; do | ||
echo | ||
echo "$transform" | ||
|
||
commit_message="lebab transform: $transform" | ||
|
||
commit_message_regex=' '$commit_message"[[:>:]]" | ||
if [[ "$(git log -20 --oneline)" =~ $commit_message_regex ]]; then | ||
echo "skipping because commit exists" | ||
continue | ||
fi | ||
|
||
yarn lebab -t "$transform" --replace "lib/" | ||
yarn lebab -t "$transform" --replace "test/" | ||
yarn lebab -t "$transform" --replace "testUtils/" | ||
yarn lebab -t "$transform" --replace "examples/" | ||
yarn fix | ||
|
||
yarn mocha | ||
git add -A . | ||
git commit --allow-empty -m "$commit_message" | ||
echo "Done with $transform" | ||
echo | ||
done | ||
|
||
git push |
This file contains 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