From 66f12e66cabfd121d61e69346c5bac6cf25d400c Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 31 Aug 2020 14:53:54 +0200
Subject: [PATCH] build-release: Use same version number format as in Git

Our releases published to Packagist use version numbers with a
"v"-prefix, e.g. "v1.18.7".

The build-release script overwrites this with a version number without
the "v"-prefix, e.g. "1.18.7".

The result of this is that the composer.json in our release tar-files
does not match the composer.lock file in the repository nor the
composer.json that Packagist looks at.

Fix this by prepending a "v" to the version number when updating
composer.json.
---
 bin/build-release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/build-release.sh b/bin/build-release.sh
index cd702b7c5..c2b880b4a 100755
--- a/bin/build-release.sh
+++ b/bin/build-release.sh
@@ -41,7 +41,7 @@ if [ ! -x "$TARGET/composer.phar" ]; then
 fi
 
 # Set the version in composer.json
-php "$TARGET/composer.phar" config version "$VERSION" -d "$TARGET"
+php "$TARGET/composer.phar" config version "v$VERSION" -d "$TARGET"
 
 # Install dependencies (without vcs history or dev tools)
 php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET"
-- 
GitLab