Created
June 12, 2017 20:31
-
-
Save tiagoengel/5891d867cfe0f106aee62643ddcd4ea8 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
echo "MAKE SURE TO START bin/mojo before you run this script!" | |
JS_SPECS=$(git diff-tree --no-commit-id --name-only -r HEAD | grep '\.test\.js') | |
RUBY_SPECS=$(git diff-tree --no-commit-id --name-only -r HEAD | grep '_spec.rb' | sed -e ':a;N;$!ba;s/\n/ /g') | |
if [ "$RUBY_SPECS" != "" ]; then | |
bin/rspec $RUBY_SPECS | |
fi | |
for file in $JS_SPECS; do | |
touch $file | |
done | |
echo "Check JS SPECS in the mojo tab!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment