capistrano-sumo 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/sumo/defaults.rb +4 -0
- data/lib/capistrano/sumo/version.rb +1 -1
- data/lib/capistrano/tasks/assets.rake +38 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4f92aab2678482e8df49df24a77e81d9f3ba95
|
4
|
+
data.tar.gz: 729024a100e9067f3a75f6819596c1223d0ae3bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83050e4927f5e1c358de0d696aaf7d0e5d192eb47fac803d02abbf15ca21204a26260872707190cbfe3d8996b3d8c8e57c02b3ba96d0564c576dbda016a4fa2c
|
7
|
+
data.tar.gz: 68f7453dfe4f6be7da08cdb70c175dd32b1e1f116ab98216c1dfec0dbc018a3536e97201c9df0e359781b547b1ed6612d34865e72538f7bcbf605243959ee233
|
@@ -1,9 +1,13 @@
|
|
1
1
|
namespace :deploy do
|
2
|
+
# compile and upload the assets
|
3
|
+
after :updated, 'sumo:assets:put'
|
4
|
+
|
2
5
|
# notify our bot about the deploy
|
3
6
|
after :finished, 'sumo:notifications:deploy'
|
4
7
|
end
|
5
8
|
|
6
9
|
# Load the tasks
|
10
|
+
load File.expand_path('../../tasks/assets.rake', __FILE__)
|
7
11
|
load File.expand_path('../../tasks/db.rake', __FILE__)
|
8
12
|
load File.expand_path('../../tasks/files.rake', __FILE__)
|
9
13
|
load File.expand_path('../../tasks/notifications.rake', __FILE__)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
namespace :sumo do
|
4
|
+
namespace :assets do
|
5
|
+
desc 'Compile the assets'
|
6
|
+
task :compile do
|
7
|
+
run_locally do
|
8
|
+
execute :gulp, '--silent', 'build:theme'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Uploads the build assets to the remote server'
|
13
|
+
task :put do
|
14
|
+
invoke 'sumo:assets:compile'
|
15
|
+
on roles(:web) do
|
16
|
+
remote_path = "#{release_path}/src/Frontend/Themes/#{theme}/Core"
|
17
|
+
|
18
|
+
# delete old folder
|
19
|
+
execute :rm, '-rf', remote_path
|
20
|
+
execute :mkdir, '-p', remote_path
|
21
|
+
|
22
|
+
# upload compiled theme
|
23
|
+
upload! "./src/Frontend/Themes/#{theme}/Core", "#{File.dirname(remote_path)}", recursive: true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def theme
|
28
|
+
package = JSON.parse(File.read('package.json'))
|
29
|
+
|
30
|
+
if not package.key?('theme')
|
31
|
+
warn Airbrussh::Colors.red('✘') + ' No theme available in package.json.'
|
32
|
+
exit 1
|
33
|
+
end
|
34
|
+
|
35
|
+
package['theme']
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-sumo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tijs Verkoyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/capistrano/sumo.rb
|
71
71
|
- lib/capistrano/sumo/defaults.rb
|
72
72
|
- lib/capistrano/sumo/version.rb
|
73
|
+
- lib/capistrano/tasks/assets.rake
|
73
74
|
- lib/capistrano/tasks/db.rake
|
74
75
|
- lib/capistrano/tasks/files.rake
|
75
76
|
- lib/capistrano/tasks/notifications.rake
|