78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# File 'lib/utopia/command.rb', line 78
def invoke(parent)
destination_root = parent.root
FileUtils.mkdir_p File.join(destination_root, "public")
Dir.chdir(destination_root) do
system("git", "init", "--shared")
system("git", "config", "receive.denyCurrentBranch", "ignore")
system("git", "config", "core.worktree", destination_root)
end
system("cp", "-r", File.join(Setup::Server::ROOT, 'git', 'hooks'), File.join(destination_root, '.git'))
Setup::Server.update_default_environment(destination_root)
hostname = `hostname`.chomp
puts "Now add the git remote to your local repository:\n\tgit remote add production ssh://#{hostname}#{destination_root}"
puts "Then push to it:\n\tgit push --set-upstream production master"
end
|