me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2016-07-20 22:40:20 +02:00
parent 13cee334f1
commit b006ba5038
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 11 additions and 2 deletions

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