Skip to content

Commit

Permalink
Makefile: improve version detection
Browse files Browse the repository at this point in the history
Prior to this change, if there was a stray tag in the repository that
did not start with a "v", the Makefile would still try to use that tag
as a version tag when constructing the RPMs.

Only use the tags that start with "v", in this case.
  • Loading branch information
ktdreyer committed Dec 12, 2016
1 parent cda4415 commit 20e7bad
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 @@ -2,7 +2,7 @@
# Try "make" (for SRPMS) or "make rpm"

NAME = ceph-ansible
VERSION := $(shell git describe --tags --abbrev=0 | sed 's/^v//')
VERSION := $(shell git describe --tags --abbrev=0 --match 'v*' | sed 's/^v//')
COMMIT := $(shell git rev-parse HEAD)
SHORTCOMMIT := $(shell echo $(COMMIT) | cut -c1-7)
RELEASE := $(shell git describe --tags --match 'v*' \
Expand Down

0 comments on commit 20e7bad

Please sign in to comment.