Rakefile in platform-api-2.2.0 vs Rakefile in platform-api-2.3.0.pre.1
- old
+ new
@@ -9,19 +9,24 @@
sh 'curl -o schema.json -H "Accept: application/vnd.heroku+json; version=3" https://api.heroku.com/schema'
sh 'bundle exec heroics-generate ./config/client-config.rb > lib/platform-api/client.rb'
end
desc 'Publish API documentation'
-task :publish do
+task :publish_docs => [:build] do
sh 'rake yard'
sh 'cp -R doc /tmp/platform-api-doc'
sh 'git checkout gh-pages'
sh 'cp -R /tmp/platform-api-doc/* .'
sh 'rm -rf /tmp/platform-api-doc'
sh 'git add .'
sh 'git commit -am "Rebuild documentation"'
sh 'git push origin gh-pages'
sh 'git checkout master'
+end
+
+# After releasing publish the docs
+Rake::Task["release"].enhance do
+ Rake::Task[:publish_docs].invoke
end
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)