Permalink
Browse files

Don't publish the feed when Jenkins regenerates the documentation

  • Loading branch information...
1 parent 1add8f5 commit 5f918a8f8193a7ceb5b4f558108a0d25c28d31f2 @blakewatters blakewatters committed Feb 7, 2013
Showing with 5 additions and 4 deletions.
  1. +4 −3 Rakefile
  2. +1 −1 Tests/cibuild
View
@@ -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
View
@@ -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

0 comments on commit 5f918a8

Please sign in to comment.