sumodev_deploy 0.5.4 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sumodev_deploy/tasks/assets.rb +6 -69
- data/lib/sumodev_deploy/tasks/files.rb +4 -4
- data/sumodev_deploy.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11088724c588a8ad5948447e2c562089ffffdd72
|
4
|
+
data.tar.gz: cbe5dbb6134e2d3f637eed55db8d96746ccc3483
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a2360d1b4375b6996c13e746000202308784e3c408cd0b14decd29ae3452413a851afbd6fa9023d6b4e5d9f594d418863373c37d74b4137926a4d2bded02221
|
7
|
+
data.tar.gz: 9a82fada7df6401b6389f2e91c85ba3e8da2da2fcb04e0a0f635881cf656e7d7932e597a1e8e123ede6d645c61d9abc052259be7454bcc0ac87d55a68f333aa2
|
@@ -2,75 +2,12 @@ Capistrano::Configuration.instance.load do
|
|
2
2
|
namespace :assets do
|
3
3
|
desc "Compile and upload the assets"
|
4
4
|
task :precompile do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
unique_coffee_folders = coffee_folders.map do |file|
|
12
|
-
File.dirname(file)
|
13
|
-
end.uniq
|
14
|
-
|
15
|
-
asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
|
16
|
-
|
17
|
-
unique_coffee_folders.each do |path|
|
18
|
-
dir_chunks = path.split('/')
|
19
|
-
last_chunk = dir_chunks.last
|
20
|
-
watch_dir = dir_chunks[0...-1].join('/')
|
21
|
-
remote_path = "#{watch_dir}/js"
|
22
|
-
|
23
|
-
run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}"
|
24
|
-
run_locally "cd #{watch_dir} && coffee -c -o #{asset_path} #{last_chunk}"
|
25
|
-
|
26
|
-
assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
|
27
|
-
(assets).each do |file, filepath|
|
28
|
-
if File.directory?(file)
|
29
|
-
run "mkdir -p #{latest_release.shellescape}/#{remote_path}/#{filepath}"
|
30
|
-
else
|
31
|
-
upload file, "#{latest_release.shellescape}/#{remote_path}#{filepath}"
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
run_locally "rm -rf #{asset_path}"
|
37
|
-
end
|
38
|
-
desc "Compile and upload the CSS files"
|
39
|
-
task :precompile_css do
|
40
|
-
require 'compass'
|
41
|
-
|
42
|
-
compass = fetch(:compass_command) do
|
43
|
-
if File.exists?("Gemfile.lock")
|
44
|
-
"bundle exec compass"
|
45
|
-
else
|
46
|
-
"compass"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
compass_folders = fetch(:compass_folders, Dir.glob('**/config.rb'))
|
50
|
-
asset_path = fetch(:asset_cache_dir, Dir.pwd + "/cache/cached_assets")
|
51
|
-
output_style = fetch(:compass_output, :compressed)
|
52
|
-
|
53
|
-
compass_folders.each do |config|
|
54
|
-
path = File.dirname(config)
|
55
|
-
Compass.add_project_configuration(config)
|
56
|
-
|
57
|
-
run_locally "rm -rf #{asset_path} && mkdir -p #{asset_path}" # Cleanup
|
58
|
-
run_locally "cd #{path} && #{compass} clean --css-dir #{asset_path}/#{Compass.configuration.css_dir} && #{compass} compile -s #{output_style} --css-dir #{asset_path}/#{Compass.configuration.css_dir}"
|
59
|
-
|
60
|
-
assets = Dir.glob(asset_path + '/**/*').map {|f| [f, f.gsub(asset_path, '')] }
|
61
|
-
sprites = Dir.glob(path + "/images/**/*").grep(/-[0-9a-z]{11}.(png|jpg)/).map {|f| [f, f.gsub(path, '')] }
|
62
|
-
|
63
|
-
(assets + sprites).each do |file, filepath|
|
64
|
-
if File.directory?(file)
|
65
|
-
run "mkdir -p #{latest_release.shellescape}/#{path}/#{filepath}"
|
66
|
-
else
|
67
|
-
upload file, "#{latest_release.shellescape}/#{path}#{filepath}"
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
run_locally "rm -rf #{asset_path}"
|
72
|
-
Compass.reset_configuration!
|
73
|
-
end
|
5
|
+
run_locally "grunt build"
|
6
|
+
run %{
|
7
|
+
rm -rf #{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core &&
|
8
|
+
mkdir -p #{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core
|
9
|
+
}
|
10
|
+
upload "./src/Frontend/Themes/#{theme}/Core", "#{latest_release.shellescape}/src/Frontend/Themes/#{theme}/Core"
|
74
11
|
end
|
75
12
|
end
|
76
13
|
end
|
@@ -32,9 +32,9 @@ Capistrano::Configuration.instance.load do
|
|
32
32
|
|
33
33
|
desc "Sync all remote files to your local install"
|
34
34
|
task :get, :roles => :app do
|
35
|
-
path = find_folder_in_parents('
|
35
|
+
path = find_folder_in_parents('src/Frontend/Files')
|
36
36
|
if !path
|
37
|
-
abort "No
|
37
|
+
abort "No src/Frontend/Files folder found in this or upper folders. Are you sure you're in a Fork project?"
|
38
38
|
else
|
39
39
|
rsync :down, shared_files_path, path, :once => true
|
40
40
|
end
|
@@ -46,9 +46,9 @@ Capistrano::Configuration.instance.load do
|
|
46
46
|
run %{cd #{shared_path} && tar -czf #{current_path}/backup_files.tgz files}
|
47
47
|
|
48
48
|
# check if folder exists
|
49
|
-
path = find_folder_in_parents('
|
49
|
+
path = find_folder_in_parents('src/Frontend/Files')
|
50
50
|
if !path
|
51
|
-
abort "No
|
51
|
+
abort "No src/Frontend/Files folder found in this or upper folders. Are you sure you're in a Fork project?"
|
52
52
|
else
|
53
53
|
rsync :up, "#{path}/", shared_files_path
|
54
54
|
end
|
data/sumodev_deploy.gemspec
CHANGED