src/Pure/Tools/ci_profile.scala
changeset 63328 7a8515c58271
parent 63294 a97a3a95be93
child 63349 6c889fe495a2
equal deleted inserted replaced
63327:83a91a73fcb5 63328:7a8515c58271
     3 
     3 
     4 Build profile for continuous integration services.
     4 Build profile for continuous integration services.
     5 */
     5 */
     6 
     6 
     7 package isabelle
     7 package isabelle
       
     8 
       
     9 
       
    10 import java.util.{Properties => JProperties}
     8 
    11 
     9 
    12 
    10 abstract class CI_Profile extends Isabelle_Tool.Body
    13 abstract class CI_Profile extends Isabelle_Tool.Body
    11 {
    14 {
    12 
    15 
    37         system_mode = true
    40         system_mode = true
    38       )
    41       )
    39     }
    42     }
    40   }
    43   }
    41 
    44 
       
    45   private def load_properties(): JProperties =
       
    46   {
       
    47     val props = new JProperties()
       
    48     val file = Path.explode(Isabelle_System.getenv_strict("ISABELLE_CI_PROPERTIES")).file
       
    49     if (file.exists())
       
    50       props.load(new java.io.FileReader(file))
       
    51     props
       
    52   }
       
    53 
    42 
    54 
    43   override final def apply(args: List[String]): Unit =
    55   override final def apply(args: List[String]): Unit =
    44   {
    56   {
    45     List("ML_PLATFORM", "ML_HOME", "ML_SYSTEM", "ML_OPTIONS").foreach(print_variable)
    57     List("ML_PLATFORM", "ML_HOME", "ML_SYSTEM", "ML_OPTIONS").foreach(print_variable)
       
    58     val props = load_properties()
       
    59     System.getProperties().putAll(props)
       
    60 
    46     val isabelle_home = Path.explode(Isabelle_System.getenv_strict("ISABELLE_HOME"))
    61     val isabelle_home = Path.explode(Isabelle_System.getenv_strict("ISABELLE_HOME"))
    47     println(s"Build for Isabelle id ${hg_id(isabelle_home)}")
    62     println(s"Build for Isabelle id ${hg_id(isabelle_home)}")
    48 
    63 
    49     val options =
    64     val options =
    50       Options.init()
    65       Options.init()