[isabelle-dev] Modest proposal for image tagging
makarius at sketis.net
Tue Jul 12 13:18:51 CEST 2011
On Tue, 12 Jul 2011, Alexander Krauss wrote:
> A) In the build process, before the invocation of isabelle usedir, paste the
> output of "hg id" (or similar) into some source file, e.g.,
> val build_version = "THE_VERSION";
> sed -i 's/THE_VERSION/$(hg id)/g' version.ML
> isabelle usedir ...
> Actually, a similar thing happens when an isabelle distribution is built
> from a repository clone.
Alex needs to do this because he his crunching on the official sources.
If you have your own project sources, you can add things directly in the
ROOT.ML files, e.g. like this:
val my_id = unsuffix "\n" (#1 (bash_output "hg id"));
val my_id = getenv "MY_ID";
In the latter case you have your own settings (potentially via user
components with etc/settings) to ensure that the environment variable is
present at build time.
More information about the isabelle-dev