Files
mz25key/update_version.sh

17 lines
518 B
Bash
Executable File

#!/bin/bash
PRJDIR=$(dirname ${PWD})
OLDVERSION=$(cat ${PRJDIR}/version.txt)
NEWVERSION=$(perl -e "$(echo "print $(cat ${PRJDIR}/version.txt)+0.01")")
# NB: mz25key project version is updated manually in the file ${PRJDIR}/mz25key_version.txt
ISNEWER=$(find ${PRJDIR}/main -newer ${PRJDIR}/version.txt)
if [[ ${ISNEWER} != "" ]]; then
echo ${NEWVERSION} > ${PRJDIR}/version.txt
echo ""
echo "Version:${OLDVERSION} -> Next Version:${NEWVERSION}"
else
echo ""
echo "Build Version:${OLDVERSION}"
fi