-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
31 lines (28 loc) · 1.25 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'fileutils'
namespace :package do
task :clean do
FileUtils.rm_rf("./package", verbose: true)
end
desc "Package the schemas for release to a client"
task :client_schemas => :clean do
FileUtils.mkdir("./package", verbose: true)
FileUtils.mkdir("./package/XMLSchemas", verbose: true)
FileUtils.cp_r("./XSD/XMLSchemas/constraint", "./package/XMLSchemas/", verbose: true)
FileUtils.cp_r("./client/examples", "./package/", verbose: true)
FileUtils.cp_r("./client/schematron", "./package/", verbose: true)
FileUtils.cp_r("./client/README.md", "./package/", verbose: true)
Dir.chdir("./package") do
system("zip -r ClientSchemas.zip XMLSchemas examples schematron README.md")
end
FileUtils.rm_rf("./package/XMLSchemas", verbose: true)
FileUtils.rm_rf("./package/examples", verbose: true)
FileUtils.rm_rf("./package/schematron", verbose: true)
FileUtils.rm_rf("./package/README.md", verbose: true)
end
desc "Package the schemas into a single folder for aca_entities"
task :aca_entities => :clean do
FileUtils.mkdir("./package", verbose: true)
FileUtils.mkdir("./package/XMLSchemas", verbose: true)
FileUtils.cp_r("./XSD/XMLSchemas/constraint", "./package/XMLSchemas/", verbose: true)
end
end