lib/capistrano/git-submodule-strategy.rb in capistrano-git-submodule-strategy-0.1.17 vs lib/capistrano/git-submodule-strategy.rb in capistrano-git-submodule-strategy-0.1.18
- old
+ new
@@ -13,11 +13,11 @@
unless test!(:git, :'ls-remote', repo_url)
context.error "Repo `#{repo_url}` does not exists"
return false
end
- if context.capture(:git, :'ls-remote', repo_url).split("\n").select{ |i| i.include?("refs/heads/#{fetch(:branch)}") }.empty?
+ if context.capture(:git, :'ls-remote', repo_url, fetch(:branch)).empty?
context.error "Branch `#{fetch(:branch)}` not found in repo `#{repo_url}`"
return false
end
true
@@ -40,10 +40,11 @@
if fetch(:git_keep_meta, false)
context.within_only release_path do
git :remote, 'set-url', 'origin', repo_url
end
else
- context.execute("find #{release_path} -name '.git*' | xargs -I {} rm -rfv '{}'")
+ verbose = Rake.application.options.trace ? 'v' : ''
+ context.execute("find #{release_path} -name '.git*' | xargs -I {} rm -rf#{verbose} '{}'")
end
end
end
end
end
\ No newline at end of file