Browse Source

pull: Update the version string.

Fixes <http://bugs.gnu.org/19278>.
Reported by Tomáš Čech <tcech@suse.cz>.

This allows 'guix --version' to return something that better represents
what version is being used.

* build-aux/build-self.scm (date-version-string): New procedure.
(build): Add #:version.
[builder]: Pass it to 'build-guix' as #:package-version.
gn-latest-20200428
Ludovic Courtès 5 years ago
parent
commit
b006ba5038
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      build-aux/build-self.scm

+ 11
- 2
build-aux/build-self.scm View File

@ -21,6 +21,7 @@
#:use-module (guix)
#:use-module (guix config)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:export (build))
;;; Commentary:
@ -70,8 +71,16 @@
(lambda (file)
(string-append (dirname file) "/.."))))
(define (date-version-string)
"Return the current date and hour in UTC timezone, for use as a poor
person's version identifier."
;; XXX: Replace with a Git commit id.
(date->string (current-date 0) "~Y~m~d.~H"))
;; The procedure below is our return value.
(define* (build source #:key verbose?
(define* (build source
#:key verbose? (version (date-version-string))
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
@ -106,7 +115,7 @@ files."
#:sbindir #$sbindir
#:package-name #$%guix-package-name
#:package-version #$%guix-version
#:package-version #$version
#:bug-report-address #$%guix-bug-report-address
#:home-page-url #$%guix-home-page-url


Loading…
Cancel
Save