tasks/mina/git.rb in mina-1.0.7 vs tasks/mina/git.rb in mina-1.1.0

- old
+ new

@@ -4,11 +4,11 @@ set :remove_git_dir, true set :remote, 'origin' set :git_not_pushed_message, -> { "Your branch #{fetch(:branch)} needs to be pushed to #{fetch(:remote)} before deploying" } namespace :git do - desc 'Clones the Git repository to the release path.' + desc 'Clones the Git repository to the current path.' task :clone do ensure!(:repository) ensure!(:deploy_to) if set?(:commit) comment %{Using git commit \\"#{fetch(:commit)}\\"} @@ -34,14 +34,16 @@ if fetch(:remove_git_dir) command %{rm -rf .git} end end + desc 'Prints out current revision' task :revision do ensure!(:deploy_to) command %{cat #{fetch(:current_path)}/.mina_git_revision} end + desc 'Ensures local repository is pushed to remote' task :ensure_pushed do run :local do comment %{Ensuring everyting is pushed to git} command %{ if [ $(git log #{fetch(:remote)}/#{fetch(:branch)}..#{fetch(:branch)} | wc -l) -ne 0 ]; then