gitscape 1.5.1 → 1.5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gitscape/base.rb +11 -4
- data/lib/gitscape/version.rb +1 -1
- metadata +3 -2
data/lib/gitscape/base.rb
CHANGED
@@ -74,11 +74,15 @@ class Gitscape::Base
|
|
74
74
|
has_conflicts
|
75
75
|
end
|
76
76
|
|
77
|
-
def hotfix_start
|
77
|
+
def hotfix_start hotfix_branch=nil, options={:push=>false}
|
78
|
+
# option defaults
|
79
|
+
options[:push] = false if options[:push].nil?
|
80
|
+
|
78
81
|
puts `git checkout live`
|
82
|
+
puts `git pull origin`
|
79
83
|
|
80
84
|
if hotfix_branch.length == 0
|
81
|
-
exception_message = "*** Improper Usage ***\nExpected Usage: hotfix_start <
|
85
|
+
exception_message = "*** Improper Usage ***\nExpected Usage: hotfix_start <hotfix_name> [--[no-]push]"
|
82
86
|
raise exception_message
|
83
87
|
end
|
84
88
|
|
@@ -86,9 +90,10 @@ class Gitscape::Base
|
|
86
90
|
puts "=== Creating hotfix branch '#{hotfix_branch}' ==="
|
87
91
|
|
88
92
|
puts `git checkout -b #{hotfix_branch}`
|
93
|
+
puts `git push origin #{hotfix_branch}` if options[:push]
|
89
94
|
end
|
90
95
|
|
91
|
-
def hotfix_finish hotfix_branch=
|
96
|
+
def hotfix_finish hotfix_branch=nil, options={:env_depth=>:staging, :push=>true, :update_env=>true}
|
92
97
|
# option defaults
|
93
98
|
options[:env_depth] = :staging if options[:env_depth].nil?
|
94
99
|
options[:push] = true if options[:push].nil?
|
@@ -100,8 +105,10 @@ class Gitscape::Base
|
|
100
105
|
|
101
106
|
previous_branch = current_branch_name
|
102
107
|
|
103
|
-
if previous_branch.start_with? "hotfix"
|
108
|
+
if previous_branch.to_s.start_with? "hotfix"
|
104
109
|
hotfix_branch ||= previous_branch
|
110
|
+
else
|
111
|
+
hotfix_branch = "hotfix/#{hotfix_branch}"
|
105
112
|
end
|
106
113
|
|
107
114
|
if hotfix_branch.to_s.empty?
|
data/lib/gitscape/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 5
|
8
|
+
- 2
|
8
9
|
- 1
|
9
|
-
version: 1.5.1
|
10
|
+
version: 1.5.2.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jon Botelho
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2013-04-
|
19
|
+
date: 2013-04-04 00:00:00 -04:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|