Use git describe to identify versions #937

issue sipa opened this issue on March 14, 2012
  1. sipa commented at 2:11 PM on March 14, 2012: member

    It would be nice if we could add a file version.h, which is autogenerated for git builds, and static for source tarballs, with the output of "git describe" as contents. This command gives as output:

    • the latest git tag reachable from the current commit
    • (if any commits since that tag) the number of such commits
    • (if any commits since that tag) the latest commit id

    That output could be used as a "build id", available via getinfo or the about box.

  2. gavinandresen commented at 2:42 PM on March 14, 2012: contributor

    Do we need the "static for source tarballs?"

    Could we just create releases using:

    make BUILD_ID=$(git describe) USE_UPNP=1 ... etc
    

    ... have version.h do: #ifndef BUILD_ID #define BUILD_ID unknown #endif (then use #BUILD_ID in the About/getinfo information)

  3. sipa commented at 9:55 PM on March 14, 2012: member

    Hmm, if we consistently change CLIENT_VERSION for all releases and release candidates, that would suffice. Otherwise, I don't think it's so hard to make it generate/include that file.

  4. laanwj commented at 8:29 AM on May 9, 2012: member

    I think this was implemented? If so, we can close the issue.

  5. laanwj closed this on Sep 20, 2012

  6. suprnurd referenced this in commit 8d28ed0dd1 on Dec 5, 2017
  7. ptschip referenced this in commit cecfb22a19 on Jan 24, 2018
  8. sipa referenced this in commit c020cbaa5c on Jul 14, 2021
  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me