@@ -213,10 +213,10 @@ task :run, :command do |_t, args|
213213 run_command args [ :command ]
214214end
215215
216- desc " Updates the rspec.github.io docs"
217- task :update_docs , [ :version , :website_path ] do |_t , args |
218- abort " You must have ag installed to generate docs" if `which ag` == ""
219- args . with_defaults ( :website_path => " ../rspec.github.io" )
216+ desc ' Updates the rspec.github.io docs'
217+ task :update_docs , [ :version , :website_path , :branch ] do |_t , args |
218+ abort ' You must have ag installed to generate docs' if `which ag` == ''
219+ args . with_defaults ( :website_path => ' ../rspec.github.io' )
220220
221221 output_directory = File . expand_path ( args [ :website_path ] )
222222
@@ -225,9 +225,9 @@ task :update_docs, [:version, :website_path] do |_t, args|
225225 projects = { }
226226 skipped = [ ]
227227
228- $stdout. write " Checking versions..."
228+ $stdout. write ' Checking versions...'
229229
230- each_project :silent => true , :except => ( UnDocumentedProjects ) do |project |
230+ each_project :silent => true , :except => UnDocumentedProjects do |project |
231231 $stdout. write "\r Checking versions... #{ project } "
232232 latest_release =
233233 if args [ :version ] =~ /maintenance$/
@@ -236,10 +236,12 @@ task :update_docs, [:version, :website_path] do |_t, args|
236236 `git fetch --tags && git tag -l "v#{ args [ :version ] } *" | grep v#{ args [ :version ] } | tail -1`
237237 end
238238
239- if latest_release . empty?
239+ if args [ :branch ] . empty? && latest_release . empty?
240240 skipped << project
241- else
241+ elsif args [ :branch ] . empty?
242242 projects [ project ] = latest_release
243+ else
244+ projects [ project ] = args [ :branch ]
243245 end
244246 $stdout. write "\r Checking versions... #{ ' ' * MAX_PROJECT_NAME_LENGTH } "
245247 end
@@ -526,12 +528,10 @@ namespace :ci do
526528 end
527529
528530 def around_update_ci_build
529- run_if_exists './script/before_update_travis_build.sh'
530531 run_if_exists './script/before_update_build.sh'
531532 yield if block_given?
532533 ensure
533534 run_if_exists './script/after_update_build.sh'
534- run_if_exists './script/after_update_travis_build.sh'
535535 end
536536
537537 desc "Update build files"
0 commit comments