Hi Arun,

Arun Isaac <arunis...@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