Skip to content

Commit

Permalink
Don't publish the feed when Jenkins regenerates the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
blakewatters committed Feb 7, 2013
1 parent 1add8f5 commit 5f918a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}..."
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -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.