Skip to content

Commit 2534420

Browse files
committed
[build] Enabling forced generation of docs
1 parent f8d3c5d commit 2534420

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Rakefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ namespace :node do
510510

511511
desc 'Generate Node documentation'
512512
task :docs do |_task, arguments|
513-
abort('Aborting documentation update: nightly versions should not update docs.') if node_version.include?('nightly')
513+
if node_version.include?('nightly') && !arguments.to_a.include?('force')
514+
abort('Aborting documentation update: nightly versions should not update docs.')
515+
end
514516

515517
puts 'Generating Node documentation'
516518
FileUtils.rm_rf('build/docs/api/javascript/')
@@ -608,7 +610,7 @@ namespace :py do
608610

609611
desc 'Generate Python documentation'
610612
task :docs do |_task, arguments|
611-
if python_version.match?(/^\d+\.\d+\.\d+\.\d+$/)
613+
if python_version.match?(/^\d+\.\d+\.\d+\.\d+$/) && !arguments.to_a.include?('force')
612614
abort('Aborting documentation update: nightly versions should not update docs.')
613615
end
614616
puts 'Generating Python documentation'
@@ -776,7 +778,9 @@ namespace :rb do
776778

777779
desc 'Generate Ruby documentation'
778780
task :docs do |_task, arguments|
779-
abort('Aborting documentation update: nightly versions should not update docs.') if ruby_version.include?('nightly')
781+
if ruby_version.include?('nightly') && !arguments.to_a.include?('force')
782+
abort('Aborting documentation update: nightly versions should not update docs.')
783+
end
780784
puts 'Generating Ruby documentation'
781785

782786
FileUtils.rm_rf('build/docs/api/rb/')
@@ -872,7 +876,7 @@ namespace :dotnet do
872876

873877
desc 'Generate .NET documentation'
874878
task :docs do |_task, arguments|
875-
if dotnet_version.include?('nightly')
879+
if dotnet_version.include?('nightly') && !arguments.to_a.include?('force')
876880
abort('Aborting documentation update: nightly versions should not update docs.')
877881
end
878882

@@ -987,7 +991,7 @@ namespace :java do
987991

988992
desc 'Generate Java documentation'
989993
task :docs do |_task, arguments|
990-
if java_version.include?('SNAPSHOT')
994+
if java_version.include?('SNAPSHOT') && !arguments.to_a.include?('force')
991995
abort('Aborting documentation update: snapshot versions should not update docs.')
992996
end
993997

0 commit comments

Comments
 (0)