From 7f01805cd53bb896f7f204dec8d8b8fdab77aaf7 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Wed, 8 Feb 2023 02:21:55 +0300 Subject: [PATCH] Fix CI+3: Append timestamps to installer artifact --- misc/windows/update_version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/misc/windows/update_version.sh b/misc/windows/update_version.sh index 1c72ef2..0ffe6d4 100755 --- a/misc/windows/update_version.sh +++ b/misc/windows/update_version.sh @@ -1,12 +1,13 @@ #!/bin/bash +TIMESTAMP=`date +%Y%m%d.%H%M%S` VERSIONMAJOR=`grep '' pom.xml | head -1 | sed -e 's/^.*//g' -e 's/\..*$//g'` VERSIONMINOR=`grep '' pom.xml | head -1 | sed -E 's/^.*[0-9]+?\.//g' | sed -E -e 's/(\..*|-SNAPSHOT|)<\/version>.*$//g'` sed -z -i -e "s/!define\ VERSIONMAJOR\ [0-9]/!define\ VERSIONMAJOR $VERSIONMAJOR\ /" misc/windows/NSIS/installer.nsi sed -z -i -e "s/!define\ VERSIONMINOR\ [0-9]/!define\ VERSIONMINOR $VERSIONMINOR\ /" misc/windows/NSIS/installer.nsi if [ $# -eq 0 ] then - sed -z -i -e "s/OutFile\ \"Installer.exe\"/OutFile\ \"Installer-$VERSIONMAJOR.$VERSIONMINOR.exe\"\ /" misc/windows/NSIS/installer.nsi + sed -z -i -e "s/OutFile\ \"Installer.exe\"/OutFile\ \"Installer-$VERSIONMAJOR.$VERSIONMINOR-$TIMESTAMP.exe\"\ /" misc/windows/NSIS/installer.nsi else - sed -z -i -e "s/OutFile\ \"Installer.exe\"/OutFile\ \"Installer-legacy-$VERSIONMAJOR.$VERSIONMINOR.exe\"\ /" misc/windows/NSIS/installer.nsi + sed -z -i -e "s/OutFile\ \"Installer-$VERSIONMAJOR.$VERSIONMINOR-[0-9]*\.[0-9]*.exe\"/OutFile\ \"Installer-legacy-$VERSIONMAJOR.$VERSIONMINOR-$TIMESTAMP.exe\"\ /" misc/windows/NSIS/installer.nsi fi