Last active
July 3, 2022 16:42
-
-
Save Chew/b2c9b7a51179eeb14744a7c0210de05f to your computer and use it in GitHub Desktop.
Revisions
-
Chew revised this gist
Jul 3, 2022 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,33 @@ # Pull from GitHub puts "Pulling..." pull = `git pull` if pull.include? "Already up to date." puts "Already up to date, nothing to deploy." exit end # Gem changes occur, we must bundle install if pull.include? "Gemfile" print "Updating Gems..." `bundle install` puts " Done!" end # Did package.json or yarn.lock change? # Install and recompile assets if pull.include?("yarn.lock") || pull.include?("package.json") print "Updating dependencies..." `yarn install --check-files` `rake assets:precompile` puts " Done!" end # Did assets change? precompile if pull.include?("assets") || pull.include?("javascript") print "Compiling assets..." `rake assets:precompile` puts " Done!" end `rails restart` -
Chew revised this gist
Jul 3, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ # Did package.json or yarn.lock change? # Install and recompile assets if pull.include?("yarn.lock") || pull.include?("package.json") `yarn install --check-files` `rake assets:precompile` end -
Chew revised this gist
Jul 3, 2022 . 1 changed file with 1 addition and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,9 @@ # Pull from GitHub pull = `git pull` # Gem changes occur, we must bundle install if pull.include? "Gemfile" `bundle install` end # Did package.json or yarn.lock change? @@ -22,11 +18,6 @@ `rake assets:precompile` end `rails restart` # Done! -
Chew created this gist
Oct 14, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ # Pull from GitHub pull = `git pull` # if a restart is needed restart = false # Gem changes occur, we must bundle install if pull.include? "Gemfile" `bundle install` restart = true end # Did package.json or yarn.lock change? # Install and recompile assets if pull.include?("yarn.lock") || pull.include("package.json") `yarn install --check-files` `rake assets:precompile` end # Did assets change? precompile if pull.include?("assets") `rake assets:precompile` end # Did config change? if pull.include?("config") restart = true end `rails restart` if restart # Done!