7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/capistrano/recipes/deploy/strategy/gradle_build.rb', line 7
def deploy!
execute "Running gradle build command" do
unless self.gradle_working_dir
set :gradle_working_dir, "./"
end
run_locally "cd #{gradle_working_dir} && #{gradle_home}/gradle #{gradle_cmd.gsub!('{release_name}', "#{File.basename(destination)}.tar")}"
run_locally "cd #{gradle_working_dir} && mv build/distributions/#{File.basename(destination)}.tar /tmp/"
end
execute "Decompressing gradle build to put REVISON file" do
run_locally "cd /tmp/ && tar -xf /tmp/#{File.basename(destination)}.tar"
end
create_revision_file
compress_repository
distribute!
ensure
rollback_changes
end
|