Fixed the version mismatch.

This commit is contained in:
Llewellyn van der Merwe 2021-06-09 12:16:41 +02:00
parent 202797f4bf
commit 4054508729
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C

View File

@ -739,6 +739,12 @@ function setLanguageXml() {
function setPackageXml() { function setPackageXml() {
# little information of progress # little information of progress
_echo "[info] Setting the Package XML..." _echo "[info] Setting the Package XML..."
# set the local version
local version
# remove all but numbers and points
# TODO we need to allow only stable versions (when getting the tags)
# shellcheck disable=SC2001
version=$(echo "${VDM_PACKAGE_VERSION:-1.0.0}" | sed 's/[^0-9.]//g')
# add the package details # add the package details
{ {
echo '<?xml version="1.0" encoding="utf-8"?>' echo '<?xml version="1.0" encoding="utf-8"?>'
@ -755,7 +761,7 @@ function setPackageXml() {
echo '</packagename>' echo '</packagename>'
# set the version # set the version
echo -en '\t<version>' echo -en '\t<version>'
echo -n "${VDM_PACKAGE_VERSION:-1.0.0}" echo -n "${version}"
echo '</version>' echo '</version>'
# set the creationDate # set the creationDate
echo -en '\t<creationDate>' echo -en '\t<creationDate>'