Skip to content

Commit 4e8a449

Browse files
authored
arrange a bit (#446)
1 parent 4efeefa commit 4e8a449

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Rakefile

+12-5
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,11 @@ task :release => :gem do
108108
tag_name = "v#{version}"
109109
raise 'Tag already exists!' if tag_exists tag_name
110110

111-
sh "git commit --allow-empty -am 'Release #{version}'"
112-
sh 'git pull'
113-
sh "git tag #{tag_name}"
114-
115111
branch_name = "release_#{version.gsub('.', '_')}"
116112
sh "git checkout -b #{branch_name}"
117113

114+
sh "git commit --allow-empty -am 'Release #{version}'"
115+
118116
# update notes now that there's a new tag
119117
Rake::Task['notes'].execute
120118
Rake::Task['docs'].execute
@@ -125,7 +123,15 @@ end
125123

126124
desc 'Build and release a new gem to rubygems.org'
127125
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+
128133
tag_name = "v#{version}"
134+
sh "git tag #{tag_name}"
129135
sh "git push origin #{tag_name}"
130136

131137
gem_build
@@ -153,6 +159,7 @@ task :uninstall do
153159
begin
154160
sh "#{cmd}"
155161
rescue
162+
# ignored
156163
end
157164
end
158165

@@ -163,7 +170,7 @@ end
163170

164171
desc 'Update android and iOS docs'
165172
task :docs do
166-
sh "ruby docs_gen/make_docs.rb"
173+
sh 'ruby docs_gen/make_docs.rb'
167174
end
168175

169176
desc 'Update release notes'

0 commit comments

Comments
 (0)