1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[misc] Moves fog.io generation a prerequsite

Generating some documentation was mixed into the `upload_` tasks. This
uses Rake's task prequsites to streamline that. Now fog.io docs can be
generated without uploading.
This commit is contained in:
Paul Thornthwaite 2012-11-11 02:02:07 +00:00
parent b10626ab8a
commit c37f9a899b

View file

@ -269,15 +269,17 @@ METADATA
end
end
task :upload_fog_io do
desc "Builds the fog.io site content locally"
task :build_fog_io do
sh "jekyll docs docs/_site"
end
task :upload_fog_io => :build_fog_io do
# connect to storage provider
Fog.credential = :geemus
storage = Fog::Storage.new(:provider => 'AWS')
directory = storage.directories.new(:key => 'fog.io')
# build the docs locally
sh "jekyll docs docs/_site"
# write web page files to versioned 'folder'
for file_path in Dir.glob('docs/_site/**/*')
next if File.directory?(file_path)