Deploying db.json and other artifacts

This commit is contained in:
Oliver Kennedy 2016-08-11 10:30:00 -04:00
parent 5e42d9008e
commit 3b3ce7c014

View file

@ -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