Skip to content

Commit

Permalink
- Allow umask to be nil
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/vlad/dev/": change = 7866]
  • Loading branch information
Mathieu Lemoine committed Oct 25, 2012
1 parent d7db00d commit 38d2694
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/vlad/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ def now
dirs += shared_paths.keys.map { |d| File.join(shared_path, d) }
dirs = dirs.join(' ')

commands = [
"umask #{umask}",
"mkdir -p #{dirs}"
]
commands = []

commands << "umask #{umask}" if umask
commands << "mkdir -p #{dirs}"

commands << "chown #{perm_owner} #{dirs}" if perm_owner
commands << "chgrp #{perm_group} #{dirs}" if perm_group

Expand All @@ -62,7 +63,8 @@ def now
remote_task :update, :roles => :app do
symlink = false
begin
commands = ["umask #{umask}"]
commands = []
commands << "umask #{umask}" if umask
unless skip_scm
commands << "cd #{scm_path}"
commands << "#{source.checkout revision, scm_path}"
Expand All @@ -87,12 +89,16 @@ def now
Rake::Task['vlad:update_symlinks'].invoke

symlink = true
commands = [
"umask #{umask}",
commands = []

commands << "umask #{umask}" if umask

commands += [
"rm -f #{current_path}",
"ln -s #{latest_release} #{current_path}",
"echo #{now} $USER #{revision} #{File.basename(release_path)} >> #{deploy_to}/revisions.log"
]

commands << "chown #{perm_owner} #{deploy_to}/revisions.log" if perm_owner
commands << "chgrp #{perm_group} #{deploy_to}/revisions.log" if perm_group

Expand Down

0 comments on commit 38d2694

Please sign in to comment.