gx 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/gx-pull-check +26 -0
  2. data/lib/gx.rb +1 -1
  3. metadata +3 -3
@@ -16,6 +16,26 @@ current_branch = head.name
16
16
  url = ARGV.shift
17
17
  cmd = ARGV.shift || "rake"
18
18
 
19
+ if current_branch == "gx-pull-check" and url == "done"
20
+ puts "Cleaning up pull-check..."
21
+ current_branch = File.read(".git/pull-check-origin").strip
22
+
23
+ repo.git.checkout({}, current_branch)
24
+ repo.git.branch({:D => true}, "gx-pull-check")
25
+
26
+ File.unlink ".git/pull-check-origin"
27
+
28
+ exit 0
29
+ elsif current_branch == "gx-pull-check"
30
+ puts "Currently handling a pull check already, please finish it first."
31
+ exit 1
32
+ end
33
+
34
+ unless url
35
+ puts "Usage: gx-pull-check URL [command to test]"
36
+ exit 1
37
+ end
38
+
19
39
  puts "Performing pull check on '#{url}'"
20
40
 
21
41
  url += ".patch"
@@ -30,6 +50,10 @@ if $?.exitstatus != 0
30
50
  exit 1
31
51
  end
32
52
 
53
+ File.open ".git/pull-check-origin", "w" do |f|
54
+ f.puts current_branch
55
+ end
56
+
33
57
  puts "Step 2: Apply the pull request..."
34
58
  repo.git.branch({}, "gx-pull-check")
35
59
  repo.git.checkout({}, "gx-pull-check")
@@ -58,4 +82,6 @@ puts "Everything ran fine, feel free to merge the pull request!"
58
82
  repo.git.checkout({}, current_branch)
59
83
  repo.git.branch({:D => true}, "gx-pull-check")
60
84
 
85
+ File.unlink ".git/pull-check-origin"
86
+
61
87
  File.unlink patch
data/lib/gx.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Gx
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.3'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 2
10
- version: 1.3.2
9
+ - 3
10
+ version: 1.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Evan Phoenix