- self.update(mode = MODE_FETCH)
- repo = git.Repo(self.folder)
- # get tag name for current commit, if any
- commit = repo.commit(self.commit)
- commitTag = filter(lambda t: t.commit == commit, repo.tags)
- if not commitTag:
- print "Version is not a tag"
- return
- currentVersion = str(commitTag[0])
- # get sorted list of tag names with the same letter prefix and higher version number
- tags = map(str, repo.tags)
+ self.update(mode = MODE_FETCH)
+ currentVersion = git.describe()[0]
+ # get sorted list of tag names with the same non-digit prefix and higher version number
+ tags = git.tag()