From d6d835e4148d2dc021283f8686efd381547fb8fe Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 3 Nov 2017 16:04:53 -0700 Subject: [PATCH] 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 --- roles/version-from-git/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/version-from-git/tasks/main.yaml b/roles/version-from-git/tasks/main.yaml index 201a67530..332937b08 100644 --- a/roles/version-from-git/tasks/main.yaml +++ b/roles/version-from-git/tasks/main.yaml @@ -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 }}"