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.
This commit is contained in:
parent
13cee334f1
commit
b006ba5038
|
@ -21,6 +21,7 @@
|
||||||
#:use-module (guix)
|
#:use-module (guix)
|
||||||
#:use-module (guix config)
|
#:use-module (guix config)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
|
#:use-module (srfi srfi-19)
|
||||||
#:export (build))
|
#:export (build))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
@ -70,8 +71,16 @@
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(string-append (dirname 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.
|
;; The procedure below is our return value.
|
||||||
(define* (build source #:key verbose?
|
(define* (build source
|
||||||
|
#:key verbose? (version (date-version-string))
|
||||||
#:allow-other-keys
|
#:allow-other-keys
|
||||||
#:rest rest)
|
#:rest rest)
|
||||||
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
|
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
|
||||||
|
@ -106,7 +115,7 @@ files."
|
||||||
#:sbindir #$sbindir
|
#:sbindir #$sbindir
|
||||||
|
|
||||||
#:package-name #$%guix-package-name
|
#:package-name #$%guix-package-name
|
||||||
#:package-version #$%guix-version
|
#:package-version #$version
|
||||||
#:bug-report-address #$%guix-bug-report-address
|
#:bug-report-address #$%guix-bug-report-address
|
||||||
#:home-page-url #$%guix-home-page-url
|
#:home-page-url #$%guix-home-page-url
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue