build: fix the "show version" output in the centos release builds 93/31893/3
authorAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 17 May 2021 16:16:28 +0000 (16:16 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Mon, 17 May 2021 17:37:57 +0000 (17:37 +0000)
A couple of releases ago I made a change that slightly changes
the naming of artifacts, in order to make the version sorting better.
However, that change broke the "show version" output of the VPP
in the RPM - that build copies the entire source tree into
a new location and builds there, supplying the version
information in .version file rather than using git describe.

Updating only the version script and not the .version file content
resulted in the VPP release builds within the RPM installs have
the "count of commits since tagging" being zero and the commit ID,
rather than having XX.YY-release format.

A couple of releases - 20.09 and 21.01, saw a more haphazard solution,
but it is proper to fix the content of the .version file so it
is all consistent.

This commit fixes the contents of this file made for the RPM build, so that
the versioning script does not see unexpected input, thus addressing
the issue of "show version" in the release build.

Change-Id: I0af68e69b1e40fc49ade759bb2f0ed9f47614217
Type: fix
Fixes: 1060332e62d1216bf33c697d0a54ba35d4903eb3
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Makefile

index 807d1ea..b57ed5c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -337,7 +337,7 @@ dist:
              --format=tar \
              -o $(DIST_FILE) \
            HEAD ; \
-           git describe > $(BR)/.version ; \
+           git describe --long > $(BR)/.version ; \
        else \
            (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
            src/scripts/version > $(BR)/.version ; \