From 3b3ce7c0144bdf02458fb4604d6ad9cd2260674f Mon Sep 17 00:00:00 2001 From: Oliver Kennedy Date: Thu, 11 Aug 2016 10:30:00 -0400 Subject: [PATCH] Deploying db.json and other artifacts --- Rakefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index a24edc98..99688821 100644 --- a/Rakefile +++ b/Rakefile @@ -9,6 +9,7 @@ require "nsfcp.rb" include GemSmith $db = JDB.new("db") +$cv_users = ["okennedy"] LabMetadata::build_people_metadata() @@ -110,7 +111,7 @@ end directory "artifacts" -["okennedy"].each do |who| +$cv_users.each do |who| file "artifacts/#{who}.tex" => (["artifacts", "db/cv/#{who}.json"]+Dir["db/cv/#{who}/**"]) do File.open("artifacts/#{who}.tex", "w+") do |fh| CV.make(who, fh) @@ -130,9 +131,12 @@ end task :cnp => "artifacts/okennedy_current_and_pending.pdf" file "artifacts/db.json" => "artifacts" do - File.open("db.json", "w+") do |f| + File.open("artifacts/db.json", "w+") do |f| f.puts JSON.generate($db.data) end end -task :documents => ["artifacts/db.json", :cv, :cnp] +directory "build/artifacts" +task :documents => ["artifacts/db.json", :cv, :cnp, "build", "build/artifacts"] do + system("cp -r artifacts/*.{pdf,json} build/artifacts/") +end \ No newline at end of file