15 val BUILD_LOG_DB = "build_log.db" |
15 val BUILD_LOG_DB = "build_log.db" |
16 val BUILD_STATUS = "build_status" |
16 val BUILD_STATUS = "build_status" |
17 |
17 |
18 val standard_log_dirs = |
18 val standard_log_dirs = |
19 List(Path.explode("~/log"), Path.explode("~/afp/log"), Path.explode("~/cronjob/log")) |
19 List(Path.explode("~/log"), Path.explode("~/afp/log"), Path.explode("~/cronjob/log")) |
20 |
|
21 val build_status_dir = root + Path.explode(BUILD_STATUS) |
|
22 |
20 |
23 |
21 |
24 /* index */ |
22 /* index */ |
25 |
23 |
26 def make_index() |
24 def make_index() |
58 parallel_jobs: Int = 1, |
56 parallel_jobs: Int = 1, |
59 remote_mac: String = "") |
57 remote_mac: String = "") |
60 { |
58 { |
61 Isabelle_System.with_tmp_dir("isadist")(base_dir => |
59 Isabelle_System.with_tmp_dir("isadist")(base_dir => |
62 { |
60 { |
63 val release_snapshot_dir = root + Path.explode(RELEASE_SNAPSHOT) |
61 Isabelle_System.update_directory(root + Path.explode(RELEASE_SNAPSHOT), |
64 |
62 website_dir => |
65 val new_snapshot = release_snapshot_dir.ext("new") |
63 Build_Release.build_release(base_dir, rev = rev, afp_rev = afp_rev, |
66 val old_snapshot = release_snapshot_dir.ext("old") |
64 parallel_jobs = parallel_jobs, remote_mac = remote_mac, website = Some(website_dir))) |
67 |
|
68 Isabelle_System.rm_tree(new_snapshot) |
|
69 Isabelle_System.rm_tree(old_snapshot) |
|
70 |
|
71 Build_Release.build_release(base_dir, rev = rev, afp_rev = afp_rev, |
|
72 parallel_jobs = parallel_jobs, remote_mac = remote_mac, website = Some(new_snapshot)) |
|
73 |
|
74 if (release_snapshot_dir.is_dir) File.move(release_snapshot_dir, old_snapshot) |
|
75 File.move(new_snapshot, release_snapshot_dir) |
|
76 Isabelle_System.rm_tree(old_snapshot) |
|
77 }) |
65 }) |
78 } |
66 } |
79 |
67 |
80 |
68 |
81 /* maintain build_log database */ |
69 /* maintain build_log database */ |
87 { |
75 { |
88 store.update_database(db, log_dirs, ml_statistics = true) |
76 store.update_database(db, log_dirs, ml_statistics = true) |
89 store.snapshot_database(db, root + Path.explode(BUILD_LOG_DB)) |
77 store.snapshot_database(db, root + Path.explode(BUILD_LOG_DB)) |
90 }) |
78 }) |
91 } |
79 } |
|
80 |
|
81 |
|
82 /* present build status */ |
|
83 |
|
84 def build_status(options: Options) |
|
85 { |
|
86 Isabelle_System.update_directory(root + Path.explode(BUILD_STATUS), |
|
87 dir => Build_Status.build_status(options, target_dir = dir)) |
|
88 } |
92 } |
89 } |