Sha256: a161b3c4c61c8523558bad81a75cada06845c311af80e0873191c70a2f9f956b
Contents?: true
Size: 1.56 KB
Versions: 2
Compression:
Stored size: 1.56 KB
Contents
#!/bin/bash echo "------> [blazing] Entering post-receive hook for <%= name %>" cd .. GIT_DIR='.git' while read oldrev newrev refname do # Reset so we dont have unstaged changes... and then checkout the pushed ref git reset --hard HEAD git checkout $refname done <% if @config.rvm %> # 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" <% 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 %> elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then # Then try to load from a root install source "/usr/local/rvm/scripts/rvm" <% 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 %> else echo '------> [blazing] ERROR: RVM was enabled in config but no RVM installation was not found\n' fi <% 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 @config.rake %> echo "------> [blazing] running rake <%= @config.rake %>" rake <%= @config.rake %> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blazing-0.2.0 | lib/blazing/templates/hook.erb |
blazing-0.1.3 | lib/blazing/templates/hook.erb |