diff --git a/Rakefile b/Rakefile index 3c7642aa06..2b88359e84 100644 --- a/Rakefile +++ b/Rakefile @@ -125,8 +125,8 @@ namespace :docs do end desc "Build and publish the documentation set to the remote server (using rsync over SSH)" - task :publish, :version, :destination do |t, args| - args.with_defaults(:version => File.read("VERSION").chomp, :destination => "restkit.org:/var/www/public/restkit.org/public/api/") + task :publish, :version, :destination, :publish_feed do |t, args| + args.with_defaults(:version => File.read("VERSION").chomp, :destination => "restkit.org:/var/www/public/restkit.org/public/api/", :publish_feed => 'true') version = args[:version] destination = args[:destination] puts "Generating RestKit docset for version #{version}..." @@ -141,7 +141,8 @@ namespace :docs do command = "rsync -rvpPe ssh --delete Docs/API/html/ #{versioned_destination}" run(command) - if $?.exitstatus == 0 + should_publish_feed = %{yes true 1}.include?(args[:publish_feed].downcase) + if $?.exitstatus == 0 && should_publish_feed command = "rsync -rvpPe ssh Docs/API/publish/* #{destination}" run(command) end diff --git a/Tests/cibuild b/Tests/cibuild index efb28bdec6..ae6309a2e6 100755 --- a/Tests/cibuild +++ b/Tests/cibuild @@ -22,6 +22,6 @@ if [ -n $DOCS_DESTINATION ]; then VERSION=`echo $GIT_BRANCH|sed -e 's/origin\///'` if [ -n $VERSION ]; then echo "Building documentation for branch $VERSION and publishing to '$DOCS_DESTINATION'" - rake docs:publish[$VERSION,$DOCS_DESTINATION] + rake docs:publish[$VERSION,$DOCS_DESTINATION,false] fi fi