pushapp 0.0.3 → 0.0.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: b3a8cd5f41dc3abef8137554e402bfd99a0d34fb
4
- data.tar.gz: 2edd0f050968289f8d9d63d69909d53efceb0518
3
+ metadata.gz: 1f0350ae01e3025935899744b2a50baecffb8d66
4
+ data.tar.gz: ceb92cb8030bfac6d17b294ce0ab13e632e933c2
5
5
  SHA512:
6
- metadata.gz: 4753df68773932645082f32ff97c6c227403ccb27663b2bc50963f7fae2ba8d3cab27ee3c914f72d0cb092eea9b088537052d7517c7a95e6a0e886d877df2f03
7
- data.tar.gz: 047466e618fd906f74b539fa776af5bccf21bacca9adf53c9c5989da23914208a4b1249a8427a19ae46d0696d023c6dbb8b612bdd56a31a4da5c692626e3c43a
6
+ metadata.gz: 704bfbd4c0ec5bd280c7cc6d445d21788eb8aab8251019a5fb678d098b6b07ccb3d8937f3b9b3b57698fe551f3ca6d5c5d80bc876dbf0e7e59cf9efb7eae103e
7
+ data.tar.gz: e7871a1228f353ffb85a78f6a7bfda03ba6596c7bda8671183e2d4af65063e286b56efc12fb5fbf1378a70520373af8f2bc541f54f034e033dbbe2822346b7ac
@@ -60,6 +60,7 @@ module Pushapp
60
60
  event = @options[:event]
61
61
  local = @options[:local]
62
62
  if local
63
+ logger.info "Starting tasks on #{event} event"
63
64
  remotes.each do |r|
64
65
  r.tasks_on(event).each do |t|
65
66
  logger.info "run: #{t.inspect}"
data/lib/pushapp/hook.rb CHANGED
@@ -110,7 +110,7 @@ module Pushapp
110
110
  end
111
111
 
112
112
  def set_setup_flag
113
- @remote.run "touch .git/.pushapp.setup.flag"
113
+ @remote.run "touch #{@remote.path}/.git/.pushapp.setup.flag"
114
114
  end
115
115
 
116
116
  def copy_hook
@@ -2,7 +2,7 @@ require 'pushapp/tasks/base'
2
2
 
3
3
  module Pushapp
4
4
  module Tasks
5
- class NginxExport < Nginx
5
+ class NginxExport < Base
6
6
  def run
7
7
  system "#{sudo} cp #{nginx_conf} #{nginx_sites}"
8
8
 
@@ -45,7 +45,7 @@ module Pushapp
45
45
 
46
46
  class UpstartRestart < Upstart
47
47
  def run_on job
48
- system "#{sudo} initctl start #{job} || initctl restart #{job}"
48
+ system "#{sudo} initctl start #{job} || #{sudo} initctl restart #{job}"
49
49
  end
50
50
 
51
51
  register_as :upstart_restart
@@ -53,7 +53,7 @@ module Pushapp
53
53
 
54
54
  class UpstartReload < Upstart
55
55
  def run_on job
56
- system "#{sudo} initctl start #{job} || initctl restart #{job}"
56
+ system "#{sudo} initctl start #{job} || #{sudo} initctl restart #{job}"
57
57
  end
58
58
 
59
59
  register_as :upstart_reload
@@ -1,3 +1,3 @@
1
1
  module Pushapp
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -1,4 +1,8 @@
1
1
  <%= load_template 'hook/setup' %>
2
2
  <%= load_template 'hook/git-reset' %>
3
+
4
+ set -e
5
+ set -o pipefail
6
+
3
7
  <%= load_template 'hook/bundler' %>
4
8
  <%= load_template 'hook/tasks' %>
@@ -1,6 +1,6 @@
1
- if [ -s "${GIT_DIR}/.pushapp.setup.flag" ]; then
1
+ if [ -f ".git/.pushapp.setup.flag" ]; then
2
2
  bundle exec pushapp trigger setup $PAP_REMOTE --local true <%= colorize %>
3
- rm "${GIT_DIR}/.pushapp.setup.flag"
3
+ rm ".git/.pushapp.setup.flag"
4
4
  fi
5
5
 
6
6
  bundle exec pushapp trigger push $PAP_REMOTE --local true <%= colorize %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Korolev