Skip to content

Commit

Permalink
Makefile: Allow lightweight tags in MXQ_VERSION_GIT
Browse files Browse the repository at this point in the history
If we build from a git repository, the build system adds the output of
`git describe` to the version information.

However, per default `git describe` searches for annotated tags
only. Since version 0.22.5, we draft releases from github enterprise,
which creates lightweight tags. For this reason, the version string
ammendment was always based on the 0.22.4 release:

    buczek@theinternet:~/git/mxq (master)$ ./mxqd --version
    mxqd - MXQ v0.25.4 (beta) [0.22.4-134-g3ae9361]
      by Marius Tolzmann <marius.tolzmann@molgen.mpg.de> 2013-2016
         and Donald Buczek <buczek@molgen.mpg.de> 2015-2016
      Max Planck Institute for Molecular Genetics - Berlin Dahlem

Add `--tags` to `git describe` so that the version string is based on
the newest tag.

    mxqd - MXQ v0.25.4 (beta) [0.25.4-4-g3ae9361]
      by Marius Tolzmann <marius.tolzmann@molgen.mpg.de> 2013-2016
         and Donald Buczek <buczek@molgen.mpg.de> 2015-2016
      Max Planck Institute for Molecular Genetics - Berlin Dahlem
  • Loading branch information
donald committed Jan 5, 2018
1 parent 3ae9361 commit 6df49ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MXQ_VERSION_PATCH = 4
MXQ_VERSION_EXTRA = "beta"
MXQ_VERSIONDATE = 2016

MXQ_VERSION_GIT := $(shell git describe --long 2>/dev/null)
MXQ_VERSION_GIT := $(shell git describe --long --tags 2>/dev/null)

MXQ_VERSION = ${MXQ_VERSION_MAJOR}.${MXQ_VERSION_MINOR}.${MXQ_VERSION_PATCH}
ifeq (${MXQ_VERSION_GIT},)
Expand Down

0 comments on commit 6df49ca

Please sign in to comment.