File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -76,17 +76,25 @@ files_changed=`git diff $old_ref $new_ref --name-status`
7676# CHECK IF WE NEED TO DO A BUNDLE
7777bundle_changed=` echo " $files_changed " | grep $' M\t Gemfile.lock' `
7878
79+ # CHECK IF WE NEED TO SPIN SOME YARN
80+ yarn_changed=` echo " $files_changed " | grep $' M\t yarn.lock' `
81+
7982migrations=` git diff --name-status $old_ref $new_ref -- db/migrate | grep ' ^[AD]' `
8083
8184if [ " $verbose " -eq 1 ]; then
82- if [ ! -z " $bundle_changed " ]; then
85+ if [ ! -z " $bundle_changed " -o ! -z " $yarn_changed " ]; then
8386 echo -e " \nPrep needed:"
84- echo -e " \t- bundle"
87+ if [ ! -z " $bundle_changed " ]; then
88+ echo -e " \t- bundle"
89+ fi
90+ if [ ! -z " $yarn_changed " ]; then
91+ echo -e " \t- yarn"
92+ fi
8593 fi
8694 if [ ! -z " $migrations " ]; then
8795 echo -e " \nMigrations needed:\n${migrations} "
8896 fi
89- if [ -z " $bundle_changed " -a -z " $migrations " ]; then
97+ if [ -z " $bundle_changed " -a -z " $yarn_changed " -a -z " $ migrations" ]; then
9098 echo -e " \nNo changes necessary\n"
9199 exit 0
92100 fi
@@ -105,6 +113,11 @@ if [ ! -z "$bundle_changed" ]; then
105113 bundle
106114fi
107115
116+ if [ ! -z " $yarn_changed " ]; then
117+ echo " Your yarn.lock has changed, running yarn"
118+ yarn
119+ fi
120+
108121if [ ! -z " $migrations " ]; then
109122 echo " Running migrations!"
110123 for migration in $migrations
You can’t perform that action at this time.
0 commit comments