bricks-deploy 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 206959cc48161d213b59128c6b39336a9ab736dc
4
- data.tar.gz: 3980bf1ffd7ce1239acf32e6b3fd92651aae89dd
3
+ metadata.gz: 09d4a4cbcab76b8e5917aeffb058da208cc2ffac
4
+ data.tar.gz: 10d7779d76f93758dfed2ea1675de2973975b910
5
5
  SHA512:
6
- metadata.gz: b8b4de09be23a91e4f6916ad6f451cee70728036ab9318b5eb1c46cd6c84062d1b20ac65423a9979c8ea1407ae8efa3cbe28da7c3799318972a5447d5730128b
7
- data.tar.gz: 3e7b7f2efec4b32085b194e43f8e39c97f4a0702c3180a5c2b8cfd0883d9eb2f10d16396a544694d554a4099459ea27e937c9cd6a4a70f9e7403fb9899307a4b
6
+ metadata.gz: c9e4f43e6c44c5590286ae61bbe3457ae105c5a3f696f99ffdb8c9c556f5519e6e40a394cc000f99dd53b68c4de07f4096df2d3d9fe39a81406630adaefca9db
7
+ data.tar.gz: 40d08c1f51b28801f226d0e4cbe8d1d547986ca280bf7db58f755111e930e8651606d3fdd4d9508364f684f406afa25a0da5a59a3db58712412600ce64f7af5f
@@ -8,15 +8,15 @@ class BricksDeploy::Generator < Thor::Group
8
8
  end
9
9
 
10
10
  def copy_main_hook
11
- copy_hook 'after_push.sh', 'deploy/after_push'
11
+ copy_hook 'after_push.sh', 'bin/deploy/remote/after_push'
12
12
  end
13
13
 
14
14
  def copy_restart_hook
15
- copy_hook 'restart.sh', 'deploy/restart'
15
+ copy_hook 'restart.sh', 'bin/deploy/remote/restart'
16
16
  end
17
17
 
18
18
  def copy_restart_callbacks
19
- copy_hook 'before_restart.rb', 'deploy/before_restart'
19
+ copy_hook 'before_restart.rb', 'bin/deploy/remote/before_restart'
20
20
  end
21
21
 
22
22
  private
@@ -13,5 +13,5 @@ umask 002
13
13
 
14
14
  git submodule sync && git submodule update --init --recursive
15
15
 
16
- run deploy/before_restart
17
- run deploy/restart && run deploy/after_restart
16
+ run bin/deploy/remote/before_restart
17
+ run bin/deploy/remote/restart && run bin/deploy/remote/after_restart
@@ -1,3 +1,3 @@
1
1
  #!/bin/sh
2
- touch tmp/restart.txt
2
+ touch var/tmp/restart.txt
3
3
  echo "restarting Passenger app"
data/lib/bricks_deploy.rb CHANGED
@@ -42,8 +42,8 @@ class BricksDeploy < Thor
42
42
  cmd << "git config --bool receive.denyNonFastForwards false" if options.shared?
43
43
  cmd << "git config receive.denyCurrentBranch ignore"
44
44
  cmd << "mkdir deploy"
45
- cmd << "echo #{options.stage} > deploy/stage"
46
- cmd << "echo #{options.color} > deploy/color"
45
+ cmd << "echo #{options.stage} > app/config/stage"
46
+ cmd << "echo #{options.color} > app/config/color"
47
47
  end
48
48
 
49
49
  invoke :hooks
@@ -60,7 +60,7 @@ class BricksDeploy < Thor
60
60
 
61
61
  desc "restart", "Restarts the application on the server"
62
62
  def restart
63
- run "cd #{deploy_to} && deploy/restart 2>&1 | tee -a log/deploy.log"
63
+ run "cd #{deploy_to} && bin/deploy/remote/restart 2>&1 | tee -a var/logs/deploy.log"
64
64
  end
65
65
 
66
66
  desc "rerun", "Runs the `deploy/after_push' callback as if a new revision was pushed via git"
@@ -69,7 +69,7 @@ class BricksDeploy < Thor
69
69
  bash -e -c '
70
70
  cd '#{deploy_to}'
71
71
  declare -a revs=( $(git rev-parse HEAD@{1} HEAD) )
72
- deploy/after_push ${revs[@]} 2>&1 | tee -a log/deploy.log
72
+ bin/deploy/remote/after_push ${revs[@]} 2>&1 | tee -a var/logs/deploy.log
73
73
  '
74
74
  BASH
75
75
  end
@@ -82,8 +82,8 @@ class BricksDeploy < Thor
82
82
  declare -a revs=( $(git rev-parse HEAD HEAD@{1}) )
83
83
  git reset --hard ${revs[1]}
84
84
  callback=after_push
85
- [ -x deploy/rollback ] && callback=rollback
86
- deploy/$callback ${revs[@]} 2>&1 | tee -a log/deploy.log
85
+ [ -x bin/deploy/remote/rollback ] && callback=rollback
86
+ bin/deploy/remote/$callback ${revs[@]} 2>&1 | tee -a var/logs/deploy.log
87
87
  '
88
88
  BASH
89
89
  end
@@ -93,7 +93,7 @@ class BricksDeploy < Thor
93
93
  method_option :lines, :aliases => '-l', :type => :numeric, :default => 20
94
94
  def log(n = nil)
95
95
  tail_args = options.tail? ? '-f' : "-n#{n || options.lines}"
96
- run "tail #{tail_args} #{deploy_to}/log/deploy.log"
96
+ run "tail #{tail_args} #{deploy_to}/var/logs/deploy.log"
97
97
  end
98
98
 
99
99
  desc "upload <files>", "Copy local files to the remote app"
@@ -31,13 +31,13 @@ fi
31
31
  umask 002
32
32
  git reset --hard
33
33
 
34
- logfile=log/deploy.log
35
- restart=tmp/restart.txt
34
+ logfile=var/logs/deploy.log
35
+ restart=var/tmp/restart.txt
36
36
 
37
37
  if [ -z "${oldrev//0}" ]; then
38
38
  # this is the first push; this branch was just created
39
- mkdir -p log tmp
40
- chmod 0775 log tmp
39
+ mkdir -p var/logs var/tmp
40
+ chmod 0775 var/logs var/tmp
41
41
  touch $logfile $restart
42
42
  chmod 0664 $logfile $restart
43
43
 
@@ -45,11 +45,11 @@ if [ -z "${oldrev//0}" ]; then
45
45
  git submodule update --recursive --init 2>&1 | tee -a $logfile
46
46
 
47
47
  # execute the one-time setup hook
48
- [ -x deploy/setup ] && deploy/setup $oldrev $newrev 2>&1 | tee -a $logfile
48
+ [ -x bin/deploy/remote/setup ] && bin/deploy/remote/setup $oldrev $newrev 2>&1 | tee -a $logfile
49
49
  else
50
50
  # log timestamp
51
51
  echo ==== $(date) ==== >> $logfile
52
52
 
53
53
  # execute the main deploy hook
54
- [ -x deploy/after_push ] && deploy/after_push $oldrev $newrev 2>&1 | tee -a $logfile
54
+ [ -x bin/deploy/remote/after_push ] && bin/deploy/remote/after_push $oldrev $newrev 2>&1 | tee -a $logfile
55
55
  fi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bricks-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mislav Marohnić