kstrano 1.1.0.alpha.1 → 1.1.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kstrano.rb +29 -0
- data/lib/kstrano_symfony2.rb +11 -5
- metadata +2 -2
data/lib/kstrano.rb
CHANGED
@@ -11,6 +11,8 @@ set :port, 22
|
|
11
11
|
set :shared_files, false
|
12
12
|
set :shared_children, false
|
13
13
|
|
14
|
+
set :copy_node_modules, true
|
15
|
+
set :copy_bower_vendors, true
|
14
16
|
|
15
17
|
namespace :files do
|
16
18
|
namespace :move do
|
@@ -167,6 +169,10 @@ namespace :frontend do
|
|
167
169
|
task :install do
|
168
170
|
run "#{try_sudo} -i sh -c 'cd #{latest_release} && npm install'"
|
169
171
|
end
|
172
|
+
|
173
|
+
task :copy, :except => { :no_release => true } do
|
174
|
+
run "#{try_sudo} sh -c 'modulesDir=#{current_path}/node_modules; if [ -d $modulesDir ] || [ -h $modulesDir ]; then cp -a $modulesDir #{latest_release}/node_modules; fi;'"
|
175
|
+
end
|
170
176
|
end
|
171
177
|
|
172
178
|
namespace :bower do
|
@@ -174,6 +180,29 @@ namespace :frontend do
|
|
174
180
|
task :install do
|
175
181
|
run "#{try_sudo} -i sh -c 'cd #{latest_release} && bower install'"
|
176
182
|
end
|
183
|
+
|
184
|
+
task :copy, :except => { :no_release => true } do
|
185
|
+
run "#{try_sudo} sh -c 'vendorDir=#{current_path}/web/vendor; if [ -d $vendorDir ] || [ -h $vendorDir ]; then cp -a $vendorDir #{latest_release}/web/vendor; fi;'"
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
namespace :grunt do
|
190
|
+
desc "Executes the grunt build task"
|
191
|
+
task :build do
|
192
|
+
run "#{try_sudo} -i sh -c 'cd #{latest_release} && grunt build'"
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
before "frontend:npm:install" do
|
198
|
+
if copy_node_modules
|
199
|
+
frontend.npm.copy
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
before "frontend:bower:install" do
|
204
|
+
if copy_bower_vendors
|
205
|
+
frontend.bower.copy
|
177
206
|
end
|
178
207
|
end
|
179
208
|
|
data/lib/kstrano_symfony2.rb
CHANGED
@@ -27,6 +27,7 @@ module KStrano
|
|
27
27
|
|
28
28
|
set :npm_install, true
|
29
29
|
set :bower_install, true
|
30
|
+
set :grunt_build, true
|
30
31
|
|
31
32
|
namespace :database do
|
32
33
|
namespace :move do
|
@@ -70,7 +71,7 @@ module KStrano
|
|
70
71
|
hostname = "#{server_project_name}.#{hostname}"
|
71
72
|
end
|
72
73
|
sudo "curl http://#{hostname}/apcclear.php"
|
73
|
-
sudo "pkill -QUIT -
|
74
|
+
sudo "pkill -QUIT -f \"^php-fpm: pool #{application} \" "
|
74
75
|
end
|
75
76
|
end
|
76
77
|
end
|
@@ -93,7 +94,7 @@ module KStrano
|
|
93
94
|
namespace :prefer do
|
94
95
|
desc "Deploy without copying the vendors from a previous install and use composer option --prefer-source"
|
95
96
|
task :source, :roles => :app, :except => { :no_release => true } do
|
96
|
-
set :composer_options, "--no-scripts --verbose --prefer-source --optimize-autoloader"
|
97
|
+
set :composer_options, "--no-dev --no-scripts --verbose --prefer-source --optimize-autoloader"
|
97
98
|
deploy.clean
|
98
99
|
end
|
99
100
|
|
@@ -133,11 +134,16 @@ module KStrano
|
|
133
134
|
|
134
135
|
["symfony:composer:install", "symfony:composer:update", "symfony:vendors:install", "symfony:vendors:upgrade"].each do |action|
|
135
136
|
after action do |variable|
|
137
|
+
if bower_install
|
138
|
+
frontend.bower.install
|
139
|
+
end
|
140
|
+
|
136
141
|
if npm_install
|
142
|
+
frontend.npm.install
|
137
143
|
end
|
138
144
|
|
139
|
-
if
|
140
|
-
frontend.
|
145
|
+
if grunt_build
|
146
|
+
frontend.grunt.build
|
141
147
|
end
|
142
148
|
end
|
143
149
|
end
|
@@ -153,4 +159,4 @@ end
|
|
153
159
|
|
154
160
|
if Capistrano::Configuration.instance
|
155
161
|
KStrano::Symfony2.load_into(Capistrano::Configuration.instance)
|
156
|
-
end
|
162
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kstrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.alpha.
|
4
|
+
version: 1.1.0.alpha.2
|
5
5
|
prerelease: 6
|
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: 2013-07-
|
12
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capifony
|