Files
pico/projects/tzpuPico/esp32/update_version.sh
2026-03-24 22:22:37 +00:00

17 lines
520 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: tzpuPico project version is updated manually in the file ${PRJDIR}/tzpuPico_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