guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: pull: Update the version string.


From: Ludovic Courtès
Subject: 03/03: pull: Update the version string.
Date: Wed, 20 Jul 2016 20:53:32 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit b006ba50384f9cb517fa881299160adba0aaca9e
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jul 20 22:40:20 2016 +0200

    pull: Update the version string.
    
    Fixes <http://bugs.gnu.org/19278>.
    Reported by Tomáš Čech <address@hidden>.
    
    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.
---
 build-aux/build-self.scm |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index c673912..5902830 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
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]