bug-guix
[Top][All Lists]
Advanced

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

bug#42212: [PATCH 1/1] self: Use nearest tag as the version string in do


From: Ludovic Courtès
Subject: bug#42212: [PATCH 1/1] self: Use nearest tag as the version string in documentation.
Date: Mon, 20 Jul 2020 10:13:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> skribis:

> * guix/channels.scm (latest-channel-instance): Write nearest tag into .version
> of the checkout.
> * guix/self.scm (info-manual): Use nearest tag from .version as the version
> string while generating documentation.

Thanks for looking into it!  Two comments:

> +      ;; Write nearest tag into .version.
> +      (with-directory-excursion checkout
> +        (let ((version
> +               (call-with-port
> +                (open-pipe* OPEN_READ "./build-aux/git-version-gen" 
> ".tarball-version")
> +                get-string-all)))
> +          (call-with-output-file ".version"
> +            (cut put-string <> version)))))
>  
>      (let* ((name     (url+commit->name (channel-url channel) commit))
>             (checkout (add-to-store store name #t "sha256" checkout

I would rather not call out to ‘git-version-gen’ and instead use (git
describe) or similar.

However, unless I’m mistaken, the output of ‘git-version-gen’ changes at
each commit, so we’d be rebuilding the manual at every commit, which is
what we should avoid here.

One way to avoid that would be to look at the latest commit that touch
doc/ instead of the latest commit overall (I think that’s what zimoun
was suggesting).  Roughly run ‘git describe’ on ‘git log doc/’, so to
speak.  (Using Guile-Git.)

Thoughts?

Ludo’.





reply via email to

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