From 6f086b73007aad96e4893d955e28e7fcd2bdb7ce Mon Sep 17 00:00:00 2001 From: Hristo Date: Sat, 10 Feb 2024 16:00:22 +0200 Subject: [PATCH] update version in config.py after installation --- install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 3b3afed..e649a14 100755 --- a/install.sh +++ b/install.sh @@ -118,6 +118,12 @@ update_config(){ sed -i "s/rpi-MQTT-monitor/${TOPIC}/" src/config.py print_green "+ config.py is updated with provided settings" + + # Get the local version + local_version=$(git describe --tags) + # Update the version in config.py + sed -i "s/version = .*/version = '${local_version}'/" src/config.py + } set_cron(){ @@ -183,7 +189,7 @@ main(){ create_venv install_requirements update_config - + while true; do read -p "Do you want to set up a (c)ron job or a (s)ervice? " cs case $cs in