kstrano 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/kstrano.rb +8 -2
  2. data/lib/kstrano_symfony2.rb +1 -1
  3. metadata +2 -2
data/lib/kstrano.rb CHANGED
@@ -150,7 +150,14 @@ namespace :kuma do
150
150
  task :perms do
151
151
  sudo "sh -c 'if [ -f /opt/kDeploy/tools/fixperms.py ] ; then cd /opt/kDeploy/tools/; python fixperms.py #{application}; fi'"
152
152
  end
153
+
154
+ desc "DON'T RUN THIS MANUALLY, is part of the deploy flow"
155
+ task :release_permissions do
156
+ sudo "chown -R #{application}:#{application} #{latest_release}"
157
+ sudo "setfacl -R -m group:admin:rwx #{latest_release}"
158
+ end
153
159
  end
160
+
154
161
  end
155
162
 
156
163
  namespace :deploy do
@@ -240,8 +247,7 @@ end
240
247
  ## Fix the permissions of the latest release, so that it's readable for the project user
241
248
  before "deploy:finalize_update" do
242
249
  on_rollback { sudo "rm -rf #{release_path}; true" } # by default capistrano will use the run command, but everything has project user rights in our server setup, so use try_sudo in stead of run.
243
- sudo "chown -R #{application}:#{application} #{latest_release}"
244
- sudo "setfacl -R -m group:admin:rwx #{latest_release}"
250
+ kuma.fix.release_permissions
245
251
  end
246
252
 
247
253
  before "deploy:update" do
@@ -128,7 +128,7 @@ module KStrano
128
128
  sudo "sh -c 'if [ -d #{latest_release}/vendor ] ; then chown -R #{application}:#{application} #{latest_release}/vendor; fi'"
129
129
  end
130
130
 
131
- before "deploy:finalize_update" do
131
+ before "kuma:fix:release_permissions" do
132
132
  sudo "sh -c 'if [ ! -f #{release_path}/app/config/parameters.ini ] && [ ! -f #{release_path}/app/config/parameters.yml ] ; then if [ -f #{release_path}/paramDecode ] ; then chmod -R ug+rx #{latest_release}/paramDecode && cd #{release_path} && ./paramDecode; elif [ -f #{release_path}/param ] ; then chmod -R ug+rx #{latest_release}/param && cd #{release_path} && ./param decode; fi; fi'"
133
133
  end
134
134
 
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.1
4
+ version: 1.1.2
5
5
  prerelease:
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-18 00:00:00.000000000 Z
12
+ date: 2013-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capifony