3 Commits

Author SHA1 Message Date
62465d2973 Include git in commands without env prefix. 2020-01-23 19:14:42 +00:00
396b2a9972 Override default runner in SSHKit 2020-01-16 19:45:18 +00:00
dcca41a841 Call system instead of execute and run_locally. 2020-01-16 18:32:54 +00:00
2 changed files with 16 additions and 0 deletions

View File

@@ -1,6 +1,21 @@
# Ensure deploy tasks are loaded before we run
require 'capistrano/deploy'
module SSHKit
class CommandMap
def defaults
Hash.new do |hash, command|
if %w{if test time exec git}.include? command.to_s || !File.executable?('/usr/bin/env')
hash[command] = command.to_s
else
hash[command] = "/usr/bin/env #{command}"
#hash[command] = "#{command}"
end
end
end
end
end
# Load extra tasks into the deploy namespace
load File.expand_path("../tasks/deploytags.rake", __FILE__)

View File

@@ -1,6 +1,7 @@
namespace :deploy do
desc 'prepare git tree so we can tag on successful deployment'
before :deploy, :prepare_tree do
SSHKit.config.default_env = {}
run_locally do
if ENV['NO_DEPLOYTAGS'] || fetch(:no_deploytags, false)
info "[deploytags] Skipping deploytags"