aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsir...@apache.org
Subject svn commit: r1739110 - /aurora/site/Rakefile
Date Thu, 14 Apr 2016 14:08:10 GMT
Author: jsirois
Date: Thu Apr 14 14:08:10 2016
New Revision: 1739110

URL: http://svn.apache.org/viewvc?rev=1739110&view=rev
Log:
Fix generate_docs[latest,master] handling.

Modified:
    aurora/site/Rakefile

Modified: aurora/site/Rakefile
URL: http://svn.apache.org/viewvc/aurora/site/Rakefile?rev=1739110&r1=1739109&r2=1739110&view=diff
==============================================================================
--- aurora/site/Rakefile (original)
+++ aurora/site/Rakefile Thu Apr 14 14:08:10 2016
@@ -67,14 +67,18 @@ task :generate_docs, [:title, :git_tag]
   #Rake::Task[:clean].invoke if File.exist?(tmp_dir)
 
   FileUtils.mkdir_p(tmp_dir)
-  archive_root = "aurora-rel-#{git_tag}"
+  
+  zip_name = "#{git_tag}.zip"
+  is_master = ['master', 'HEAD'].include? git_tag
+  archive_root = if is_master then "aurora-#{git_tag}" else "aurora-rel-#{git_tag}" end
+  archive_rel_url = if is_master then zip_name else "rel/#{zip_name}" end
+
   Dir.chdir(tmp_dir) {
-    zip_name = "#{git_tag}.zip"
-    if File.exist?(zip_name) and not ['master', 'HEAD'].include? git_tag
+    if File.exist?(zip_name) and not is_master
       puts 'Skipping archive fetch'
     else
       puts "Fetching archive of #{git_tag}"
-      system("wget https://github.com/apache/aurora/archive/rel/#{zip_name} -O #{zip_name}")
+      system("wget https://github.com/apache/aurora/archive/#{archive_rel_url} -O #{zip_name}")
     end
     system("unzip -o #{zip_name} '#{archive_root}/docs/*'")
   }



Mime
View raw message