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:
parent
b10626ab8a
commit
c37f9a899b
1 changed files with 6 additions and 4 deletions
10
Rakefile
10
Rakefile
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue