egads 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/egads/cli.rb +16 -9
- data/lib/egads/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjFlZmRlNWRmNTUwYmM5MjAxM2Y1NjMzNTFmOGIyMTkxYWM1Njc3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2U5MjdmMzc0YWFhMGIzZjM4Y2ViNWIwZTdhYjE3ZjMxZDAyMjBmMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2VhOWNlMmEwMjI0MTIzNjRkODFjMWYzNTU0YzY3OWIxYWZhNGEzMmI5MTgw
|
10
|
+
MmU3NjdhMTk1Y2FjMDdmODExODMyNjkwOWFjNjVmZjE2YjU3ZWQxZDdjZTA2
|
11
|
+
MjRmN2I3NDJkZGFmZmZiOTI4YzU1MDMzMjg3ODQ0Y2M0Nzg4ZDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWM4MWQ5ZjQ2YmVkMzg2OTJhYjBhNDZmMTdkZDgxZTkwZjI5NTYwNWU5ZTcw
|
14
|
+
MGM3OGY0ZTFjMzA3MjYzMDQ5OTE1N2U1MzNhMWNiODNiMjJjNjQxZjViMDdi
|
15
|
+
MGI0OWI5ZTlhNWE5YTNiODY3M2NmYTI5OWIzM2I0MjhjZmU0M2Y=
|
data/lib/egads/cli.rb
CHANGED
@@ -120,13 +120,22 @@ module Egads
|
|
120
120
|
inside dir do
|
121
121
|
run_hooks_for(:stage, :before)
|
122
122
|
|
123
|
-
|
123
|
+
# Bundler
|
124
|
+
if File.readable?("Gemfile")
|
125
|
+
bundler_args = %w(--deployment --quiet)
|
126
|
+
# Hack to force bundle options overridden by --deployment
|
127
|
+
bundler_args << "--without #{ENV['BUNDLE_WITHOUT']}" if ENV['BUNDLE_WITHOUT']
|
128
|
+
bundler_args << "--path #{ENV['BUNDLE_PATH']}" if ENV['BUNDLE_PATH']
|
129
|
+
|
130
|
+
run_or_die("bundle install #{bundler_args * ' '}")
|
131
|
+
end
|
132
|
+
|
124
133
|
if shared_path = ENV['SHARED_PATH']
|
125
134
|
symlink_directory File.join(shared_path, 'system'), File.join(dir, 'public', 'system')
|
126
135
|
symlink_directory File.join(shared_path, 'log'), File.join(dir, 'log')
|
127
136
|
|
128
137
|
# Symlink config files
|
129
|
-
shared_config = File.join(
|
138
|
+
shared_config = File.join(shared_path, 'config')
|
130
139
|
if File.directory?(shared_config)
|
131
140
|
Dir.glob("#{shared_config}/*").each do |source|
|
132
141
|
basename = File.basename(source)
|
@@ -172,14 +181,12 @@ module Egads
|
|
172
181
|
end
|
173
182
|
|
174
183
|
desc "trim N", "[remote, plumbing] Deletes old releases, keeping the N most recent (by mtime)"
|
184
|
+
method_option :force, type: :boolean, default: false, banner: "No op, compatible with release"
|
175
185
|
def trim(n=4)
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
say_status :trim, "Deleting #{dir}"
|
181
|
-
FileUtils.rm_rf(dir)
|
182
|
-
end
|
186
|
+
dirs = Dir.glob('*').sort_by{|path| File.mtime(path) }.reverse[n..-1].to_a
|
187
|
+
dirs.each do |dir|
|
188
|
+
say_status :trim, "Deleting #{dir}"
|
189
|
+
FileUtils.rm_rf(dir)
|
183
190
|
end
|
184
191
|
end
|
185
192
|
|
data/lib/egads/version.rb
CHANGED