2023-02-08 01:15:30 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-02-08 02:21:55 +03:00
|
|
|
TIMESTAMP=`date +%Y%m%d.%H%M%S`
|
2023-02-08 01:15:30 +03:00
|
|
|
VERSIONMAJOR=`grep '<version>' pom.xml | head -1 | sed -e 's/^.*<version>//g' -e 's/\..*$//g'`
|
|
|
|
VERSIONMINOR=`grep '<version>' pom.xml | head -1 | sed -E 's/^.*<version>[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
|
2023-02-08 02:21:55 +03:00
|
|
|
sed -z -i -e "s/OutFile\ \"Installer.exe\"/OutFile\ \"Installer-$VERSIONMAJOR.$VERSIONMINOR-$TIMESTAMP.exe\"\ /" misc/windows/NSIS/installer.nsi
|
2023-02-08 01:15:30 +03:00
|
|
|
else
|
2023-02-08 02:21:55 +03:00
|
|
|
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
|
2023-02-08 01:15:30 +03:00
|
|
|
fi
|