From 6dc5c2d769989f227462ee0f956f113cedff8de8 Mon Sep 17 00:00:00 2001 From: nomennescio Date: Thu, 25 Jan 2024 11:29:01 +0100 Subject: [PATCH] Report versions --- Dockerfile | 3 ++- info/postbuild/postbuild.factor | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 83675a7..c482b0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN set -ex; \ zlib1g-dev \ libpq-dev \ libsnappy-dev \ + libzstd-dev \ ; \ rm -rf /var/lib/apt/lists/*; @@ -56,7 +57,7 @@ RUN set -ex; \ ./extra/talks \ ; \ # reimage factor.image - ./factor -run=codewars.imager; + ./factor -factor-version="$FACTOR_VERSION" -testest-version="$TESTEST_VERSION" -run=codewars.imager; ENV PATH=/opt/factor:$PATH \ FACTOR_ROOTS=/workspace diff --git a/info/postbuild/postbuild.factor b/info/postbuild/postbuild.factor index 3f73426..6842d29 100644 --- a/info/postbuild/postbuild.factor +++ b/info/postbuild/postbuild.factor @@ -1,7 +1,16 @@ ! copyright 2024 nomennescio -USING: accessors assocs compiler.errors io kernel namespaces prettyprint sequences sequences.extras sets source-files.errors tools.errors ; +USING: accessors assocs compiler.errors formatting io kernel namespaces prettyprint sequences sequences.extras sets source-files.errors system tools.errors ; IN: postbuild +: report-factor-version ( -- ) + "## Factor version : " write vm-version print + vm-git-id dup "git ID %s\n" printf +; + +: report-testest-version ( -- ) + "## Testest version : " write "testest-version" get print +; + : report-missing-libraries ( -- ) linkage-errors get values [ error>> no-such-library? ] [ error>> name>> ] filter-map members [ "## Missing libraries" print @@ -10,6 +19,8 @@ IN: postbuild ; : run ( -- ) + report-factor-version + report-testest-version report-missing-libraries ;