pushdeploy 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ require 'pushdeploy'
23
23
  PushDeploy.new(ARGV) do
24
24
  bundle
25
25
  migrate
26
- run "touch ./tmp/restart.txt"
26
+ run "touch \#{@deploy_to}/tmp/restart.txt"
27
27
  end
28
28
  }
29
29
 
@@ -90,7 +90,7 @@ unset GIT_DIR && cd \$deploy_dir && git --work-tree=\$deploy_dir pull #{reposito
90
90
 
91
91
  hook_file.write %{source "#{rvm_path}/scripts/rvm"\nrvm #{rvm_string}\n} if rvm_path && rvm_string
92
92
 
93
- hook_file.write "\$deploy_dir/config/after_deploy.rb \$oldrev \$newrev \$refname \$deploy_dir"
93
+ hook_file.write "\$deploy_dir/config/after_deploy.rb \$deploy_dir \$oldrev \$newrev \$refname"
94
94
 
95
95
  `chmod 770 #{repository}/hooks/post-receive`
96
96
 
@@ -1,3 +1,3 @@
1
1
  module Pushdeploy
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
data/lib/pushdeploy.rb CHANGED
@@ -4,11 +4,9 @@ class PushDeploy
4
4
 
5
5
  def initialize(args, &block)
6
6
 
7
- puts 'Running auto_deploy...'
8
-
9
- @deploy_to = args[3]
7
+ puts 'Running after_deploy...'
10
8
 
11
- @oldrev, @newrev = args.shift, args.shift || 'HEAD'
9
+ @deploy_to, @oldrev, @newrev = args.shift, args.shift, args.shift || 'HEAD'
12
10
  if @oldrev == '0000000000000000000000000000000000000000'
13
11
  @oldrev = EMPTY_DIR
14
12
  elsif @oldrev.nil?
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: pushdeploy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.19
5
+ version: 0.0.20
6
6
  platform: ruby
7
7
  authors:
8
8
  - Artem Yankov
@@ -31,7 +31,6 @@ files:
31
31
  - Rakefile
32
32
  - bin/pushdeploy_create_config
33
33
  - bin/pushdeploy_install_hook
34
- - hooks/post-receive
35
34
  - lib/pushdeploy.rb
36
35
  - lib/pushdeploy/version.rb
37
36
  - pushdeploy.gemspec
data/hooks/post-receive DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/sh
2
- deploy_dir=/Users/yankoff/ruby/pushdeploy
3
- read oldrev newrev refname
4
-
5
- unset GIT_DIR && cd $deploy_dir && git --work-tree=$deploy_dir pull ./ -f
6
- source "/Users/yankoff/.rvm/scripts/rvm"
7
- rvm ruby-1.9.2-p136
8
- $deploy_dir/config/auto_deploy.rb $oldrev $newrev $refname $deploy_dir