deb_deploy 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/deb_deploy.rb +19 -6
- metadata +3 -3
data/lib/deb_deploy.rb
CHANGED
@@ -14,9 +14,9 @@ Capistrano::Configuration.instance.load do
|
|
14
14
|
task :default do
|
15
15
|
case debian_package_manager
|
16
16
|
when "dpkg"
|
17
|
-
|
17
|
+
dpkg
|
18
18
|
when "apt"
|
19
|
-
|
19
|
+
apt
|
20
20
|
else
|
21
21
|
raise "#{debian_package_manager} is an unsupported package manager. Only dpkg and apt are supported"
|
22
22
|
end
|
@@ -69,22 +69,35 @@ Capistrano::Configuration.instance.load do
|
|
69
69
|
|
70
70
|
task :install_packages do
|
71
71
|
log = if debian_stream_log
|
72
|
-
|
72
|
+
DebDeploy::Logger::Stream.new(logger)
|
73
73
|
else
|
74
|
-
|
74
|
+
DebDeploy::Logger::Batch.new(logger)
|
75
75
|
end
|
76
76
|
|
77
77
|
begin
|
78
|
-
list_packages_cmd = "zcat #{debian_target}/Packages.gz | grep Package | cut -d ' ' -f2 | sed ':a;N;$!ba;s/\n/ /g'"
|
79
78
|
case debian_package_manager
|
80
79
|
when "dpkg"
|
81
80
|
sudo "dpkg -R -i #{debian_target}" do |channel, stream, data|
|
82
81
|
log.collect(channel[:host], data)
|
83
82
|
end
|
84
83
|
when "apt"
|
85
|
-
run "cd #{debian_target} &&
|
84
|
+
run "cd #{debian_target} && apt-ftparchive packages . | gzip -9c > Packages.gz"
|
85
|
+
|
86
|
+
release_file_options = {
|
87
|
+
"Codename" => "deb_deploy",
|
88
|
+
"Components" => "deb_deploy",
|
89
|
+
"Origin" => "deb_deploy",
|
90
|
+
"Label" => "Deployed with deb_deploy",
|
91
|
+
"Architectures" => "all",
|
92
|
+
"Suite" => "stable"
|
93
|
+
}
|
94
|
+
|
95
|
+
run "cd #{debian_target} && apt-ftparchive " << release_file_options.map{|k,v| "-o APT::FTPArchive::Release::#{k}='#{v}'"}.join(' ') << " release . > Release"
|
96
|
+
|
86
97
|
sudo "apt-get update"
|
87
98
|
|
99
|
+
list_packages_cmd = "zcat #{debian_target}/Packages.gz | grep Package | cut -d ' ' -f2 | sed ':a;N;$!ba;s/\n/ /g'"
|
100
|
+
|
88
101
|
run "#{list_packages_cmd} | xargs #{sudo} apt-get -y --allow-unauthenticated install" do |channel, stream, data|
|
89
102
|
log.collect(channel[:host], data)
|
90
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deb_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: See http://github.com/jeroenr/deb_deploy
|
15
15
|
email:
|
@@ -48,5 +48,5 @@ rubyforge_project:
|
|
48
48
|
rubygems_version: 1.8.23
|
49
49
|
signing_key:
|
50
50
|
specification_version: 3
|
51
|
-
summary:
|
51
|
+
summary: Deploying debian packages with capistrano
|
52
52
|
test_files: []
|