Skip to content
Snippets Groups Projects
  1. Feb 20, 2020
    • juga's avatar
      fix: Add at build time the git revion to version · 76ef2fe0
      juga authored
      Instead of having a hardcoded version, calculate the version at build
      time making use of `git describe --tags --dirty --always`.
      
      This way, even if the program is not running from inside a git
      repository it still can know which was the git revision from the
      source it was installed from.
      If the program is launched from a path that is a git repository, it
      does not gives the git revision of that other repository.
      
      If's also able to get the version when installed from a tarball.
      It does not add the git revision when it's being install from a git
      tag.
      
      `versioneer` external program is only needed the first time, because
      it copies itself into the repository. So it does not add an external
      dependency.
      
      There're no changes needed to the `--version` cli argument nor to the
      code that generates the bandwidth file, since they both use the
      variable `__version__`.
      
      The version previous to this commit was `1.1.1-dev0`, after
      this commit, it becomes `1.1.0+xx.gyyyyyyyy`, ie. xx commits after
      `1.1.0` plus the git short hash (yyyyyyyy).
      
      Closes: #30899.
      76ef2fe0
Loading