File tree 3 files changed +47
-1
lines changed
3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ Manifest.txt
3
3
README.txt
4
4
Rakefile
5
5
bin/gx-publish
6
+ bin/gx-pull-check
6
7
bin/gx-update
7
8
lib/gx.rb
8
9
lib/gx/enhance.rb
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+
5
+ require 'gx/enhance'
6
+
7
+ STDOUT . sync = true
8
+
9
+ repo = Grit ::Repo . current
10
+
11
+ head = Grit ::Head . current ( repo )
12
+
13
+ current_branch = head . name
14
+
15
+ url = ARGV . shift
16
+ cmd = ARGV . shift || "rake"
17
+
18
+ repo . git . branch ( { } , "gx-pull-check" )
19
+ repo . git . checkout ( { } , "gx-pull-check" )
20
+
21
+ puts "Performing pull check on '#{ url } '"
22
+
23
+ puts "Step 1: Apply the pull request..."
24
+ system "hub am '#{ url } '"
25
+
26
+ if $?. exitstatus != 0
27
+ puts "Error applying the pull request, leaving you in the branch"
28
+ exit 1
29
+ end
30
+
31
+ puts "Step 2: run '#{ cmd } '..."
32
+
33
+ system cmd
34
+
35
+ if $?. exitstatus != 0
36
+ puts "Error running test command, leaving you in the branch"
37
+ exit 1
38
+ end
39
+
40
+ puts "========================================="
41
+ puts "Everything ran fine, feel free to merge the pull request!"
42
+
43
+ repo . git . checkout ( { } , current_branch )
44
+ repo . git . branch ( { :D => true } , "gx-pull-check" )
45
+
Original file line number Diff line number Diff line change 1
1
class Gx
2
- VERSION = '1.1 .0'
2
+ VERSION = '1.2 .0'
3
3
end
You can’t perform that action at this time.
0 commit comments