@@ -135,7 +135,7 @@ begin
135
135
task :update_readme do
136
136
Dir . chdir __dir__ do
137
137
content = File . read ( File . join ( 'README.md' ) ) .
138
- gsub ( /\[ ([\w ]+)\] \( http:\/ \/ ruby-concurrency\. github\. io\/ concurrent-ruby\/ master\/ .*\) / ) do |_ |
138
+ gsub ( /\[ ([\w ]+)\] \( http:\/ \/ ruby-concurrency\. github\. io\/ concurrent-ruby\/ master\/ .*\) / ) do |_ |
139
139
case $1
140
140
when 'LockFreeLinkedSet'
141
141
"{Concurrent::Edge::#{ $1} #{ $1} }"
@@ -165,9 +165,9 @@ begin
165
165
desc "* of #{ name } into subdir #{ name } "
166
166
YARD ::Rake ::YardocTask . new ( name ) do |yard |
167
167
yard . options . push (
168
- '--output-dir' , output_dir ,
169
- '--main' , 'tmp/README.md' ,
170
- *common_yard_options )
168
+ '--output-dir' , output_dir ,
169
+ '--main' , 'tmp/README.md' ,
170
+ *common_yard_options )
171
171
yard . files = [ './lib/concurrent-ruby/**/*.rb' ,
172
172
'./lib/concurrent-ruby-edge/**/*.rb' ,
173
173
'./ext/concurrent_ruby_ext/**/*.c' ,
@@ -189,9 +189,9 @@ begin
189
189
desc "* signpost for versions"
190
190
YARD ::Rake ::YardocTask . new ( :signpost ) do |yard |
191
191
yard . options . push (
192
- '--output-dir' , 'docs' ,
193
- '--main' , 'docs-source/signpost.md' ,
194
- *common_yard_options )
192
+ '--output-dir' , 'docs' ,
193
+ '--main' , 'docs-source/signpost.md' ,
194
+ *common_yard_options )
195
195
yard . files = [ 'no-lib' ]
196
196
end
197
197
@@ -206,7 +206,7 @@ begin
206
206
sh 'diff -r docs/ docs-copy/' do |ok , res |
207
207
unless ok
208
208
begin
209
- STDOUT . puts 'Command failed. Continue? (y/n)'
209
+ STDOUT . puts "yard: #{ name } is not properly generated and committed." , " Continue? (y/n)"
210
210
input = STDIN . gets . strip . downcase
211
211
end until %w( y n ) . include? ( input )
212
212
exit 1 if input == 'n'
@@ -242,18 +242,19 @@ namespace :release do
242
242
sh 'test -z "$(git status --porcelain)"' do |ok , res |
243
243
unless ok
244
244
begin
245
- STDOUT . puts 'Command failed. Continue? (y/n)'
245
+ status = `git status --porcelain`
246
+ STDOUT . puts 'There are local changes that you might want to commit.' , status , 'Continue? (y/n)'
246
247
input = STDIN . gets . strip . downcase
247
248
end until %w( y n ) . include? ( input )
248
249
exit 1 if input == 'n'
249
250
end
250
251
end
251
252
sh 'git fetch'
252
253
sh 'test $(git show-ref --verify --hash refs/heads/master) = ' +
253
- '$(git show-ref --verify --hash refs/remotes/origin/master)' do |ok , res |
254
+ '$(git show-ref --verify --hash refs/remotes/origin/master)' do |ok , res |
254
255
unless ok
255
256
begin
256
- STDOUT . puts 'Command failed. Continue? (y/n)'
257
+ STDOUT . puts 'Local master branch is not pushed to origin.' , ' Continue? (y/n)'
257
258
input = STDIN . gets . strip . downcase
258
259
end until %w( y n ) . include? ( input )
259
260
exit 1 if input == 'n'
@@ -292,12 +293,12 @@ namespace :release do
292
293
293
294
task :ask do
294
295
begin
295
- STDOUT . puts 'Do you want to publish anything? (y/n)'
296
+ STDOUT . puts 'Do you want to publish anything now ? (y/n)'
296
297
input = STDIN . gets . strip . downcase
297
298
end until %w( y n ) . include? ( input )
298
299
exit 1 if input == 'n'
299
300
begin
300
- STDOUT . puts 'Do you want to publish edge? (y/n)'
301
+ STDOUT . puts 'It will publish `concurrent-ruby`. Do you want to publish `concurrent-ruby- edge` ? (y/n)'
301
302
input = STDIN . gets . strip . downcase
302
303
end until %w( y n ) . include? ( input )
303
304
publish_edge = input == 'y'
@@ -326,9 +327,10 @@ namespace :release do
326
327
327
328
desc '** print post release steps'
328
329
task :post_steps do
329
- puts 'Manually: create a release on GitHub with relevant changelog part'
330
- puts 'Manually: send email same as release with relevant changelog part'
331
- puts 'Manually: tweet'
330
+ # TODO: (petr 05-Jun-2021) automate and renew the process
331
+ # puts 'Manually: create a release on GitHub with relevant changelog part'
332
+ # puts 'Manually: send email same as release with relevant changelog part'
333
+ # puts 'Manually: tweet'
332
334
end
333
335
end
334
336
end
0 commit comments