just one task to identify Isabelle + AFP repository snapshots and build release;
report AFP changeset id on website;
--- a/src/Pure/Admin/build_release.scala Wed Oct 26 14:50:28 2016 +0200
+++ b/src/Pure/Admin/build_release.scala Wed Oct 26 14:52:41 2016 +0200
@@ -39,6 +39,7 @@
def build_release(base_dir: Path,
progress: Progress = Ignore_Progress,
rev: String = "",
+ afp_rev: String = "",
official_release: Boolean = false,
release_name: String = "",
platform_families: List[String] = default_platform_families,
@@ -124,6 +125,10 @@
Isabelle_System.mkdirs(dir)
+ val afp_link =
+ HTML.link("https://bitbucket.org/isa-afp/afp-devel/commits/" + afp_rev,
+ HTML.text("AFP/" + afp_rev))
+
File.write(dir + Path.explode("index.html"),
HTML.output_document(
List(HTML.title(release_info.name)),
@@ -131,7 +136,8 @@
HTML.chapter(release_info.name + " (" + release_id + ")"),
HTML.itemize(
website_platform_bundles.map({ case (bundle, info) =>
- List(HTML.link(bundle, HTML.text(info.platform_description))) })))))
+ List(HTML.link(bundle, HTML.text(info.platform_description))) }))) :::
+ (if (afp_rev == "") Nil else List(HTML.par(HTML.text("See also ") ::: List(afp_link))))))
for ((bundle, _) <- website_platform_bundles)
File.copy(release_info.dist_dir + Path.explode(bundle), dir)
@@ -182,6 +188,7 @@
def main(args: Array[String])
{
Command_Line.tool0 {
+ var afp_rev = ""
var remote_mac = ""
var official_release = false
var release_name = ""
@@ -195,6 +202,7 @@
Usage: Admin/build_release [OPTIONS] BASE_DIR
Options are:
+ -A REV corresponding AFP changeset id
-M USER@HOST remote Mac OS X for dmg build
-O official release (not release-candidate)
-R RELEASE proper release with name
@@ -207,6 +215,7 @@
Build Isabelle release in base directory, using the local repository clone.
""",
+ "A:" -> (arg => afp_rev = arg),
"M:" -> (arg => remote_mac = arg),
"O" -> (_ => official_release = true),
"R:" -> (arg => release_name = arg),
@@ -221,7 +230,7 @@
val progress = new Console_Progress()
- build_release(Path.explode(base_dir), progress = progress, rev = rev,
+ build_release(Path.explode(base_dir), progress = progress, rev = rev, afp_rev = afp_rev,
official_release = official_release, release_name = release_name, website = website,
platform_families =
if (platform_families.isEmpty) default_platform_families else platform_families,
--- a/src/Pure/Admin/isabelle_cronjob.scala Wed Oct 26 14:50:28 2016 +0200
+++ b/src/Pure/Admin/isabelle_cronjob.scala Wed Oct 26 14:52:41 2016 +0200
@@ -34,21 +34,35 @@
/** particular tasks **/
- /* identify Isabelle + AFP repository snapshots */
+ /* identify Isabelle + AFP repository snapshots and build release */
- private val isabelle_identify =
- Logger_Task("isabelle_identify", logger =>
- {
- val isabelle_id = Mercurial.repository(isabelle_repos).id()
- val afp_id = Mercurial.setup_repository(afp_source, afp_repos).id()
+ private val build_release =
+ Logger_Task("build_release", logger =>
+ Isabelle_System.with_tmp_dir("isadist")(base_dir =>
+ {
+ val rev = Mercurial.repository(isabelle_repos).id()
+ val afp_rev = Mercurial.setup_repository(afp_source, afp_repos).id()
- File.write(logger.log_dir + Build_Log.log_filename("isabelle_identify", logger.start_date),
- terminate_lines(
- List("isabelle_identify: " + Build_Log.print_date(logger.start_date),
- "",
- "Isabelle version: " + isabelle_id,
- "AFP version: " + afp_id)))
- })
+ File.write(logger.log_dir + Build_Log.log_filename("isabelle_identify", logger.start_date),
+ terminate_lines(
+ List("isabelle_identify: " + Build_Log.print_date(logger.start_date),
+ "",
+ "Isabelle version: " + rev,
+ "AFP version: " + afp_rev)))
+
+ val new_snapshot = release_snapshot.ext("new")
+ val old_snapshot = release_snapshot.ext("old")
+
+ Isabelle_System.rm_tree(new_snapshot)
+ Isabelle_System.rm_tree(old_snapshot)
+
+ Build_Release.build_release(base_dir, rev = rev, afp_rev = afp_rev,
+ parallel_jobs = 4, remote_mac = "macbroy31", website = Some(new_snapshot))
+
+ if (release_snapshot.is_dir) File.mv(release_snapshot, old_snapshot)
+ File.mv(new_snapshot, release_snapshot)
+ Isabelle_System.rm_tree(old_snapshot)
+ }))
/* integrity test of build_history vs. build_history_base */
@@ -70,27 +84,6 @@
})
- /* build release from repository snapshot */
-
- private val build_release =
- Logger_Task("build_release", logger =>
- Isabelle_System.with_tmp_dir("isadist")(base_dir =>
- {
- val new_snapshot = release_snapshot.ext("new")
- val old_snapshot = release_snapshot.ext("old")
-
- Isabelle_System.rm_tree(new_snapshot)
- Isabelle_System.rm_tree(old_snapshot)
-
- Build_Release.build_release(base_dir, parallel_jobs = 4,
- remote_mac = "macbroy31", website = Some(new_snapshot))
-
- if (release_snapshot.is_dir) File.mv(release_snapshot, old_snapshot)
- File.mv(new_snapshot, release_snapshot)
- Isabelle_System.rm_tree(old_snapshot)
- }))
-
-
/* remote build_history */
private sealed case class Remote_Build(
@@ -284,7 +277,7 @@
run(main_start_date,
Logger_Task("isabelle_cronjob", _ =>
run_now(
- SEQ(List(isabelle_identify, build_history_base, build_release,
+ SEQ(List(build_release, build_history_base,
PAR(remote_builds.map(seq => SEQ(seq.map(remote_build_history(rev, _))))))))))
log_service.shutdown()