File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,11 @@ task :release => :gem do
108
108
tag_name = "v#{ version } "
109
109
raise 'Tag already exists!' if tag_exists tag_name
110
110
111
- sh "git commit --allow-empty -am 'Release #{ version } '"
112
- sh 'git pull'
113
- sh "git tag #{ tag_name } "
114
-
115
111
branch_name = "release_#{ version . gsub ( '.' , '_' ) } "
116
112
sh "git checkout -b #{ branch_name } "
117
113
114
+ sh "git commit --allow-empty -am 'Release #{ version } '"
115
+
118
116
# update notes now that there's a new tag
119
117
Rake ::Task [ 'notes' ] . execute
120
118
Rake ::Task [ 'docs' ] . execute
125
123
126
124
desc 'Build and release a new gem to rubygems.org'
127
125
task :publish do
126
+ unless `git branch` . include? '* master'
127
+ puts 'Master branch required to release.'
128
+ exit!
129
+ end
130
+
131
+ sh 'git pull'
132
+
128
133
tag_name = "v#{ version } "
134
+ sh "git tag #{ tag_name } "
129
135
sh "git push origin #{ tag_name } "
130
136
131
137
gem_build
@@ -153,6 +159,7 @@ task :uninstall do
153
159
begin
154
160
sh "#{ cmd } "
155
161
rescue
162
+ # ignored
156
163
end
157
164
end
158
165
163
170
164
171
desc 'Update android and iOS docs'
165
172
task :docs do
166
- sh " ruby docs_gen/make_docs.rb"
173
+ sh ' ruby docs_gen/make_docs.rb'
167
174
end
168
175
169
176
desc 'Update release notes'
You can’t perform that action at this time.
0 commit comments