@@ -509,19 +509,21 @@ namespace :node do
509509 task deploy : :release
510510
511511 desc 'Generate Node documentation'
512- task :docs , [ :skip_update ] do |_task , arguments |
512+ task :docs do |_task , arguments |
513513 abort ( 'Aborting documentation update: nightly versions should not update docs.' ) if node_version . include? ( 'nightly' )
514514
515515 puts 'Generating Node documentation'
516516 FileUtils . rm_rf ( 'build/docs/api/javascript/' )
517517 begin
518- sh 'npm install --prefix javascript/selenium-webdriver' , verbose : true
519- sh 'npm run generate-docs --prefix javascript/selenium-webdriver' , verbose : true
518+ Dir . chdir ( 'javascript/selenium-webdriver' ) do
519+ sh 'pnpm install' , verbose : true
520+ sh 'pnpm run generate-docs' , verbose : true
521+ end
520522 rescue StandardError => e
521523 puts "Node documentation generation contains errors; continuing... #{ e . message } "
522524 end
523525
524- update_gh_pages unless arguments [ : skip_update]
526+ update_gh_pages unless arguments . to_a . include? ( ' skip_update' )
525527 end
526528
527529 desc 'Update JavaScript changelog'
@@ -544,9 +546,7 @@ namespace :node do
544546 end
545547
546548 # Update package-lock.json
547- Dir . chdir ( 'javascript/selenium-webdriver' ) do
548- sh 'npm install --prefix javascript/selenium-webdriver' , verbose : true
549- end
549+ sh 'pnpm install --dir javascript/selenium-webdriver' , verbose : true
550550 @git . add ( 'javascript/selenium-webdriver/package-lock.json' )
551551 end
552552end
@@ -611,7 +611,7 @@ namespace :py do
611611 end
612612
613613 desc 'Generate Python documentation'
614- task :docs , [ :skip_update ] do |_task , arguments |
614+ task :docs do |_task , arguments |
615615 if python_version . match? ( /^\d +\. \d +\. \d +\. \d +$/ )
616616 abort ( 'Aborting documentation update: nightly versions should not update docs.' )
617617 end
@@ -626,7 +626,7 @@ namespace :py do
626626 raise
627627 end
628628
629- update_gh_pages unless arguments [ : skip_update]
629+ update_gh_pages unless arguments . to_a . include? ( ' skip_update' )
630630 end
631631
632632 desc 'Install Python wheel locally'
@@ -779,7 +779,7 @@ namespace :rb do
779779 end
780780
781781 desc 'Generate Ruby documentation'
782- task :docs , [ :skip_update ] do |_task , arguments |
782+ task :docs do |_task , arguments |
783783 abort ( 'Aborting documentation update: nightly versions should not update docs.' ) if ruby_version . include? ( 'nightly' )
784784 puts 'Generating Ruby documentation'
785785
@@ -788,7 +788,7 @@ namespace :rb do
788788 FileUtils . mkdir_p ( 'build/docs/api' )
789789 FileUtils . cp_r ( 'bazel-bin/rb/docs.sh.runfiles/_main/docs/api/rb/.' , 'build/docs/api/rb' )
790790
791- update_gh_pages unless arguments [ : skip_update]
791+ update_gh_pages unless arguments . to_a . include? ( ' skip_update' )
792792 end
793793
794794 desc 'Update Ruby changelog'
@@ -875,7 +875,7 @@ namespace :dotnet do
875875 end
876876
877877 desc 'Generate .NET documentation'
878- task :docs , [ :skip_update ] do |_task , arguments |
878+ task :docs do |_task , arguments |
879879 if dotnet_version . include? ( 'nightly' )
880880 abort ( 'Aborting documentation update: nightly versions should not update docs.' )
881881 end
@@ -905,7 +905,7 @@ namespace :dotnet do
905905 end
906906 end
907907
908- update_gh_pages unless arguments [ : skip_update]
908+ update_gh_pages unless arguments . to_a . include? ( ' skip_update' )
909909 end
910910
911911 desc 'Update .NET changelog'
@@ -990,15 +990,15 @@ namespace :java do
990990 task install : :'maven-install'
991991
992992 desc 'Generate Java documentation'
993- task :docs , [ :skip_update ] do |_task , arguments |
993+ task :docs do |_task , arguments |
994994 if java_version . include? ( 'SNAPSHOT' )
995995 abort ( 'Aborting documentation update: snapshot versions should not update docs.' )
996996 end
997997
998998 puts 'Generating Java documentation'
999999 Rake ::Task [ 'javadocs' ] . invoke
10001000
1001- update_gh_pages unless arguments [ : skip_update]
1001+ update_gh_pages unless arguments . to_a . include? ( ' skip_update' )
10021002 end
10031003
10041004 desc 'Update Maven dependencies'
@@ -1248,8 +1248,8 @@ def update_gh_pages(force: true)
12481248 @git . fetch ( 'https://github.com/seleniumhq/selenium.git' , { ref : 'gh-pages' } )
12491249
12501250 unless force
1251- puts 'Stashing current changes before checkout ...'
1252- Git :: Stash . new ( @git , 'stash wip' )
1251+ puts 'Stash changes that are not docs ...'
1252+ @git . lib . send ( :command , 'stash' , [ 'push' , '-m' , 'stash wip', '--' , ':(exclude)build/docs/api/' ] )
12531253 end
12541254
12551255 @git . checkout ( 'gh-pages' , force : force )
0 commit comments