diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-07-20 22:40:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-07-20 22:53:02 +0200 |
commit | b006ba50384f9cb517fa881299160adba0aaca9e (patch) | |
tree | 0910d9ce37abe95b0f50f002a7955ab5832999e1 | |
parent | 13cee334f1a31e7d8f7124d045b136106fe8d356 (diff) | |
download | gnu-guix-b006ba50384f9cb517fa881299160adba0aaca9e.tar gnu-guix-b006ba50384f9cb517fa881299160adba0aaca9e.tar.gz |
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.
-rw-r--r-- | build-aux/build-self.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index c673912af5..59028305e7 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -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 |