@@ -510,7 +510,9 @@ namespace :node do
510
510
511
511
desc 'Generate Node documentation'
512
512
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
514
516
515
517
puts 'Generating Node documentation'
516
518
FileUtils . rm_rf ( 'build/docs/api/javascript/' )
@@ -608,7 +610,7 @@ namespace :py do
608
610
609
611
desc 'Generate Python documentation'
610
612
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' )
612
614
abort ( 'Aborting documentation update: nightly versions should not update docs.' )
613
615
end
614
616
puts 'Generating Python documentation'
@@ -776,7 +778,9 @@ namespace :rb do
776
778
777
779
desc 'Generate Ruby documentation'
778
780
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
780
784
puts 'Generating Ruby documentation'
781
785
782
786
FileUtils . rm_rf ( 'build/docs/api/rb/' )
@@ -872,7 +876,7 @@ namespace :dotnet do
872
876
873
877
desc 'Generate .NET documentation'
874
878
task :docs do |_task , arguments |
875
- if dotnet_version . include? ( 'nightly' )
879
+ if dotnet_version . include? ( 'nightly' ) && ! arguments . to_a . include? ( 'force' )
876
880
abort ( 'Aborting documentation update: nightly versions should not update docs.' )
877
881
end
878
882
@@ -987,7 +991,7 @@ namespace :java do
987
991
988
992
desc 'Generate Java documentation'
989
993
task :docs do |_task , arguments |
990
- if java_version . include? ( 'SNAPSHOT' )
994
+ if java_version . include? ( 'SNAPSHOT' ) && ! arguments . to_a . include? ( 'force' )
991
995
abort ( 'Aborting documentation update: snapshot versions should not update docs.' )
992
996
end
993
997
0 commit comments