capistrano-deploy-management 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'capistrano-deploy-management'
|
4
4
|
s.description = 'Collection of Capistrano recipes for deploying Rails apps into high-performance environments'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.31'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ['Dominik Rodler']
|
8
8
|
s.email = ['dominik.rodler@gmail.com']
|
data/changelog.md
CHANGED
@@ -21,17 +21,19 @@ module CapistranoDeployManagement
|
|
21
21
|
|
22
22
|
desc 'Precompile assets if any assets have changed.'
|
23
23
|
task :lazy_precompile do
|
24
|
-
current_revision
|
25
|
-
head_revision
|
26
|
-
assets_paths
|
24
|
+
current_revision = "cat #{current_path}/REVISION"
|
25
|
+
head_revision = "cat #{latest_release}/REVISION"
|
26
|
+
assets_paths = ["#{latest_release}/app/assets/", "#{latest_release}/lib/assets/", "#{latest_release}/vendor/assets/"]
|
27
|
+
precompilation_required = false
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
assets_paths.each do |a|
|
30
|
+
if capture("cd #{latest_release} && svn log -r $(#{current_revision}):$(#{head_revision}) #{a} | wc -l").to_i > 0
|
31
|
+
precompilation_required = true
|
32
|
+
else
|
33
|
+
logger.info "Skipping pre-compilation for assets in #{a} because there were no asset changes."
|
34
|
+
end
|
35
|
+
end
|
36
|
+
run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile" if precompilation_required
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|