:return:

def get_version(self):
        """
        :return:
        """
        tag = next((tag for tag in self.repo.tags if tag.commit == self.repo.commit()), None)
        if tag:
            return tag

        return self.repo.rev_parse(str(self.repo.commit()))