diff --git a/pkgs/distro-build/config.rkt b/pkgs/distro-build/config.rkt index 9bd9a96..09e7973 100644 --- a/pkgs/distro-build/config.rkt +++ b/pkgs/distro-build/config.rkt @@ -121,6 +121,7 @@ [(#:dist-catalogs) (and (list? val) (andmap string? val))] [(#:dist-base-url) (string? val)] [(#:install-name) (string? val)] + [(#:build-stamp) (string? val)] [(#:max-vm) (real? val)] [(#:server) (simple-string? val)] [(#:host) (simple-string? val)] diff --git a/pkgs/distro-build/doc.txt b/pkgs/distro-build/doc.txt index 9f9360d..1daefe6 100644 --- a/pkgs/distro-build/doc.txt +++ b/pkgs/distro-build/doc.txt @@ -146,6 +146,11 @@ Site-configuration keywords (where means no spaces, etc.): where "" keeps the name as the Racket version; the default is "snapshot" if the value of `#:release?' is false, "" otherwise. + #:build-stamp --- a string representing a build stamp, + recorded in installes; the default is from the `BUILD_STAMP' + makefile variable or generated if the value of `#:release?' is + false, "" otherwise. + #:dist-name --- the distribution name; defaults to the `DIST_NAME' makefile variable diff --git a/pkgs/distro-build/drive-clients.rkt b/pkgs/distro-build/drive-clients.rkt index 7db5bb0..c0ed0a7 100644 --- a/pkgs/distro-build/drive-clients.rkt +++ b/pkgs/distro-build/drive-clients.rkt @@ -9,7 +9,8 @@ (only-in "config.rkt" current-mode site-config? - site-config-tag site-config-options site-config-content) + site-config-tag site-config-options site-config-content + current-stamp) "url-options.rkt" "display-time.rkt" "readme.rkt") @@ -257,6 +258,9 @@ (define install-name (get-opt c '#:install-name (if release? "" snapshot-install-name))) + (define build-stamp (get-opt c '#:build-stamp (if release? + "" + (current-stamp)))) (~a " SERVER=" server " PKGS=" (q pkgs) " DOC_SEARCH=" (q doc-search) @@ -267,6 +271,7 @@ " DIST_SUFFIX=" (q dist-suffix) " DIST_CATALOGS_q=" (qq dist-catalogs kind) " INSTALL_NAME=" (q install-name) + " BUILD_STAMP=" (q build-stamp) " RELEASE_MODE=" (if release? "--release" (q "")) " SOURCE_MODE=" (if source-runtime? "--source" (q "")) " PKG_SOURCE_MODE=" (if source-pkgs? @@ -343,7 +348,10 @@ '#:pkgs (string-split default-pkgs) '#:install-name (if (get-opt c '#:release? default-release?) "" - snapshot-install-name)))))) + snapshot-install-name) + '#:build-stamp (if (get-opt c '#:release? default-release?) + "" + (current-stamp))))))) (make-directory* (build-path "build" "readmes")) (define readme (make-temporary-file "README-~a" diff --git a/pkgs/distro-build/set-config.rkt b/pkgs/distro-build/set-config.rkt index eea6620..d98d65b 100644 --- a/pkgs/distro-build/set-config.rkt +++ b/pkgs/distro-build/set-config.rkt @@ -6,13 +6,15 @@ "url-options.rkt") (define-values (dest-config-file config-file config-mode - install-name + install-name build-stamp default-doc-search default-catalogs) (command-line #:args - (dest-config-file config-file config-mode install-name doc-search . catalog) + (dest-config-file config-file config-mode + install-name build-stamp + doc-search . catalog) (values dest-config-file config-file config-mode - install-name + install-name build-stamp doc-search catalog))) (define config (if (equal? config-file "") @@ -42,7 +44,10 @@ c))))] [table (if (equal? install-name "") table - (hash-set table 'installation-name install-name))]) + (hash-set table 'installation-name install-name))] + [table (if (equal? build-stamp "") + table + (hash-set table 'build-stamp build-stamp))]) (unless (equal? table orig) (make-directory* (path-only dest-config-file)) (call-with-output-file dest-config-file