src/Pure/Admin/build_release.scala
changeset 73521 a6ca869af096
parent 73520 4cba4e250c28
child 73522 b219774a71ae
equal deleted inserted replaced
73520:4cba4e250c28 73521:a6ca869af096
    23     progress: Progress,
    23     progress: Progress,
    24     val date: Date,
    24     val date: Date,
    25     val dist_name: String,
    25     val dist_name: String,
    26     val dist_dir: Path,
    26     val dist_dir: Path,
    27     val dist_version: String,
    27     val dist_version: String,
    28     val ident: String)
    28     val ident: String,
       
    29     val tags: String)
    29   {
    30   {
    30     val isabelle: Path = Path.explode(dist_name)
    31     val isabelle: Path = Path.explode(dist_name)
    31     val isabelle_dir: Path = dist_dir + isabelle
    32     val isabelle_dir: Path = dist_dir + isabelle
    32     val isabelle_id: Path = isabelle_dir + Path.explode("etc/ISABELLE_ID")
    33     val isabelle_id: Path = isabelle_dir + Path.explode("etc/ISABELLE_ID")
       
    34     val isabelle_tags: Path = isabelle_dir + Path.explode("etc/ISABELLE_TAGS")
    33     val isabelle_archive: Path = dist_dir + Path.explode(dist_name + ".tar.gz")
    35     val isabelle_archive: Path = dist_dir + Path.explode(dist_name + ".tar.gz")
    34     val isabelle_library_archive: Path = dist_dir + Path.explode(dist_name + "_library.tar.gz")
    36     val isabelle_library_archive: Path = dist_dir + Path.explode(dist_name + "_library.tar.gz")
    35 
    37 
    36     def other_isabelle(dir: Path): Other_Isabelle =
    38     def other_isabelle(dir: Path): Other_Isabelle =
    37       Other_Isabelle(dir + isabelle,
    39       Other_Isabelle(dir + isabelle,
   396 
   398 
   397       val version = proper_string(rev) orElse proper_release_name getOrElse "tip"
   399       val version = proper_string(rev) orElse proper_release_name getOrElse "tip"
   398       val ident =
   400       val ident =
   399         try { hg.id(version) }
   401         try { hg.id(version) }
   400         catch { case ERROR(msg) => cat_error("Bad repository version: " + version, msg) }
   402         catch { case ERROR(msg) => cat_error("Bad repository version: " + version, msg) }
       
   403       val tags = hg.tags(rev = ident)
   401 
   404 
   402       val dist_version =
   405       val dist_version =
   403         proper_release_name match {
   406         proper_release_name match {
   404           case Some(name) => name + ": " + Date.Format("LLLL uuuu")(date)
   407           case Some(name) => name + ": " + Date.Format("LLLL uuuu")(date)
   405           case None => "Isabelle repository snapshot " + ident + " " + Date.Format.date(date)
   408           case None => "Isabelle repository snapshot " + ident + " " + Date.Format.date(date)
   406         }
   409         }
   407 
   410 
   408       new Release(progress, date, dist_name, dist_dir, dist_version, ident)
   411       new Release(progress, date, dist_name, dist_dir, dist_version, ident, tags)
   409     }
   412     }
   410 
   413 
   411 
   414 
   412     /* make distribution */
   415     /* make distribution */
   413 
   416 
   448 
   451 
   449 
   452 
   450       progress.echo_warning("Preparing distribution " + quote(release.dist_name))
   453       progress.echo_warning("Preparing distribution " + quote(release.dist_name))
   451 
   454 
   452       File.write(release.isabelle_id, release.ident)
   455       File.write(release.isabelle_id, release.ident)
       
   456       File.write(release.isabelle_tags, release.tags)
   453 
   457 
   454       patch_release(release)
   458       patch_release(release)
   455 
   459 
   456       if (proper_release_name.isEmpty) make_announce(release)
   460       if (proper_release_name.isEmpty) make_announce(release)
   457 
   461