Skip to content

Commit 5f06b9b

Browse files
committed
Update building instructions
1 parent d3892de commit 5f06b9b

File tree

3 files changed

+46
-54
lines changed

3 files changed

+46
-54
lines changed

BUILDING.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,19 +353,43 @@ and load the appropriate C extensions.
353353
No gems should depend on `concurrent-ruby-ext`. Doing so will force C extensions on your users. The
354354
best practice is to depend on `concurrent-ruby` and let users to decide if they want C extensions.
355355

356+
## Building the gem
357+
358+
### Requirements
359+
360+
* Recent CRuby
361+
* JRuby, `rbenv install jruby-9.2.17.0`
362+
* Set env variable `CONCURRENT_JRUBY_HOME` to point to it, e.g. `/usr/local/opt/rbenv/versions/jruby-9.2.17.0`
363+
* Install Docker, required for Windows builds
364+
365+
### Publishing the Gem
366+
367+
* Update`version.rb`
368+
* Update the CHANGELOG
369+
* Update the Yard documentation
370+
- Add the new version to `docs-source/signpost.md`. Needs to be done only if there are visible changes in the
371+
documentation.
372+
- Run `bundle exec rake yard` to update the master documentation and signpost.
373+
- Run `bundle exec rake yard:<new-version>` to add or update the documentation of the new version.
374+
* Commit (and push) the changes.
375+
* Use `be rake release` to release the gem. It consists
376+
of `['release:checks', 'release:build', 'release:test', 'release:publish']` steps. It will ask at the end before
377+
publishing anything. Steps can also be executed individually.
378+
356379
## Maintainers
357380

358-
* [Petr Chalupa](https://github.com/pitr-ch) (lead maintainer, point-of-contact)
359-
* [Jerry D'Antonio](https://github.com/jdantonio) (creator)
360-
* [Chris Seaton](https://github.com/chrisseaton)
381+
* [Petr Chalupa](https://github.com/pitr-ch) — Lead maintainer, point-of-contact.
382+
* [Chris Seaton](https://github.com/chrisseaton)
383+
If Petr is not available Chris can help or poke Petr to pay attention where it is needed.
361384

362385
### Special Thanks to
363386

387+
* [Jerry D'Antonio](https://github.com/jdantonio) for creating the gem
364388
* [Brian Durand](https://github.com/bdurand) for the `ref` gem
365389
* [Charles Oliver Nutter](https://github.com/headius) for the `atomic` and `thread_safe` gems
366390
* [thedarkone](https://github.com/thedarkone) for the `thread_safe` gem
367391

368-
and to the past maintainers
392+
to the past maintainers
369393

370394
* [Michele Della Torre](https://github.com/mighe)
371395
* [Paweł Obrok](https://github.com/obrok)

Rakefile

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ begin
135135
task :update_readme do
136136
Dir.chdir __dir__ do
137137
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 |_|
139139
case $1
140140
when 'LockFreeLinkedSet'
141141
"{Concurrent::Edge::#{$1} #{$1}}"
@@ -165,9 +165,9 @@ begin
165165
desc "* of #{name} into subdir #{name}"
166166
YARD::Rake::YardocTask.new(name) do |yard|
167167
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)
171171
yard.files = ['./lib/concurrent-ruby/**/*.rb',
172172
'./lib/concurrent-ruby-edge/**/*.rb',
173173
'./ext/concurrent_ruby_ext/**/*.c',
@@ -189,9 +189,9 @@ begin
189189
desc "* signpost for versions"
190190
YARD::Rake::YardocTask.new(:signpost) do |yard|
191191
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)
195195
yard.files = ['no-lib']
196196
end
197197

@@ -206,7 +206,7 @@ begin
206206
sh 'diff -r docs/ docs-copy/' do |ok, res|
207207
unless ok
208208
begin
209-
STDOUT.puts 'Command failed. Continue? (y/n)'
209+
STDOUT.puts "yard:#{name} is not properly generated and committed.", "Continue? (y/n)"
210210
input = STDIN.gets.strip.downcase
211211
end until %w(y n).include?(input)
212212
exit 1 if input == 'n'
@@ -242,18 +242,19 @@ namespace :release do
242242
sh 'test -z "$(git status --porcelain)"' do |ok, res|
243243
unless ok
244244
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)'
246247
input = STDIN.gets.strip.downcase
247248
end until %w(y n).include?(input)
248249
exit 1 if input == 'n'
249250
end
250251
end
251252
sh 'git fetch'
252253
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|
254255
unless ok
255256
begin
256-
STDOUT.puts 'Command failed. Continue? (y/n)'
257+
STDOUT.puts 'Local master branch is not pushed to origin.', 'Continue? (y/n)'
257258
input = STDIN.gets.strip.downcase
258259
end until %w(y n).include?(input)
259260
exit 1 if input == 'n'
@@ -292,12 +293,12 @@ namespace :release do
292293

293294
task :ask do
294295
begin
295-
STDOUT.puts 'Do you want to publish anything? (y/n)'
296+
STDOUT.puts 'Do you want to publish anything now? (y/n)'
296297
input = STDIN.gets.strip.downcase
297298
end until %w(y n).include?(input)
298299
exit 1 if input == 'n'
299300
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)'
301302
input = STDIN.gets.strip.downcase
302303
end until %w(y n).include?(input)
303304
publish_edge = input == 'y'
@@ -326,9 +327,10 @@ namespace :release do
326327

327328
desc '** print post release steps'
328329
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'
332334
end
333335
end
334336
end

0 commit comments

Comments
 (0)