version-from-git: fix logic with tags

When there is no commit since the tag, we don't want the scm_sha part of
project_ver, but just the scm_tag. This patch fix the logic.

Change-Id: I89e59049fe65ebc49fc03f205affa68b8fa5beb9
This commit is contained in:
Emilien Macchi 2017-11-03 16:04:53 -07:00
parent 00c8d67f69
commit d6d835e414

View File

@ -63,6 +63,6 @@
project_ver: "{{ scm_tag }}"
- name: Set project_ver if there are commits since the tag
when: not commits_since_tag
when: commits_since_tag
set_fact:
project_ver: "{{ scm_tag }}.{{ commits_since_tag }}.{{ scm_sha }}"