Sha256: f8eb0be366618756fdf04a7d6eaaf4fec4f920cd7daa0c2b2e7e84b5ca7af26b
Contents?: true
Size: 1.73 KB
Versions: 1
Compression:
Stored size: 1.73 KB
Contents
#!/bin/bash echo "------" echo "------ [blazing] ENTERING POST RECEIVE HOOK FOR: <%= name %>" echo "------" cd .. GIT_DIR='.git' while read oldrev newrev refname do # Reset so we dont have unstaged changes... and then checkout the pushed ref echo "------> [blazing] Doing a hard reset and checking out $refname since thats what you pushed" git reset --hard HEAD git checkout $refname done <% if @config.rvm %> # # Custom RVM script location? # <% if @config.rvm_scripts %> source <%= @config.rvm_scripts %> echo "------> [blazing] Loading rvmscripts from custom location" # # Normal RVM installation # <% else %> # Load RVM into a shell session *as a function* if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then # First try to load from a user install source "$HOME/.rvm/scripts/rvm" elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then # Then try to load from a root install source "/usr/local/rvm/scripts/rvm" else echo '------> [blazing] ERROR: RVM was enabled in config but no RVM installation was not found\n' fi <% end %> # # Apply rvm env # <% if @config.rvm == :rvmrc %> echo "------> [blazing] Loading rvm from .rvmrc" source .rvmrc <% else %> echo "------> [blazing] Loading rvm string: <%= @config.rvm %>" rvm use <%= @config.rvm %> <% end %> <% end %> echo "------> [blazing] Bundling gems" bundle --deployment --quiet --without development test <% unless @config.recipes.empty? %> echo "------> [blazing] Running recipes for <%= name.to_s %>" bundle exec blazing recipes:run <%= name.to_s %> <% end %> <% if @target.rake_command %> echo "------> [blazing] running <%= @target.rake_command %>" <%= @target.rake_command %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blazing-0.2.9 | lib/blazing/templates/hook.erb |