From db5386073871e3e7a0d99b01f3d34f4706a1b206 Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 1 Oct 2023 11:12:02 +0200 Subject: [PATCH 1/5] Remobe old file --- .../bin/upgrade_homeassistant.sh | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100755 conf/homeassistant_conf_files/bin/upgrade_homeassistant.sh diff --git a/conf/homeassistant_conf_files/bin/upgrade_homeassistant.sh b/conf/homeassistant_conf_files/bin/upgrade_homeassistant.sh deleted file mode 100755 index 230871a..0000000 --- a/conf/homeassistant_conf_files/bin/upgrade_homeassistant.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# -# upgrade_homeassistant.sh - Simple shell script to upgrade homeassistant installed in a python environnement -# - -# Uncomment to enable debugging to stderr (prints full client output and more) -#DEBUG=1 - -# define usefull variables -app="homeassistant" -install_dir="/var/www/$app" -data_dir="/home/yunohost.app/$app" - -########## END OF CONFIGURATION ########## - - -########## SCRIPT CODE FOLLOWS, DON'T TOUCH! ########## - -# Log messages to log file. -log() { - echo "$(date) $1" >> $LOG_FILE -} - -# Reset log file. -if [ ! -z "$DEBUG" ]; then - LOG_FILE=$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/upgrade_homeassistant.log" - [ -f "$LOG_FILE" ] && :> "$LOG_FILE" -fi - -# upgrade the virtual environment -MY_PYTHON=$(readlink -e "$install_dir/bin/python") -[ ! -z "$DEBUG" ] && log "Using pyhton '$MY_PYTHON'." -$MY_PYTHON -m venv --upgrade "$install_dir" - -# Run source in a 'sub shell' -( - # activate the virtual environment - set +o nounset - [ ! -z "$DEBUG" ] && log "Activate the virtual environment" - source "$install_dir/bin/activate" - set -o nounset - - # add pip - [ ! -z "$DEBUG" ] && log "Upgrade pip" - "$install_dir/bin/python3" -m ensurepip --upgrade - - local VERBOSE - [ ! -z "$DEBUG" ] && VERBOSE="--log $LOG_FILE" - - # install last version of wheel, pip & mysqlclient - [ ! -z "$DEBUG" ] && log "Install latest pip version of wheel, pip & mysqlclient" - "$install_dir/bin/pip3" --cache-dir "$data_dir/.cache" install --upgrade wheel pip mysqlclient $VERBOSE - - # upgrade homeassistant python package - [ ! -z "$DEBUG" ] && log "Install latest pip version of $app" - "$install_dir/bin/pip3" --cache-dir "$data_dir/.cache" install --upgrade $app $VERBOSE -) - -# restart homeassistant systemd service -[ ! -z "$DEBUG" ] && log "Restart $app systemd service" -sudo systemctl restart $app.service - -exit 0 From 153d17c88d3271403719b8a591b97ea359069cd5 Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 1 Oct 2023 18:57:39 +0200 Subject: [PATCH 2/5] Add new workflow --- .github/workflows/update_master.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/update_master.yml diff --git a/.github/workflows/update_master.yml b/.github/workflows/update_master.yml new file mode 100644 index 0000000..f6ae54a --- /dev/null +++ b/.github/workflows/update_master.yml @@ -0,0 +1,23 @@ +name: Create master promotion pull request +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it when when someone pushes to testing + push: + branches: + - testing +jobs: + masterPromotion: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: master + - name: Reset promotion branch + run: | + git fetch origin testing:testing + git reset --hard testing + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + branch: master-promotion From 7aa206093c83ce09d70665df1b9b7f343bf4ca36 Mon Sep 17 00:00:00 2001 From: ewilly Date: Sun, 1 Oct 2023 20:38:46 +0200 Subject: [PATCH 3/5] Update update_master.yml --- .github/workflows/update_master.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update_master.yml b/.github/workflows/update_master.yml index f6ae54a..a289a45 100644 --- a/.github/workflows/update_master.yml +++ b/.github/workflows/update_master.yml @@ -21,3 +21,6 @@ jobs: uses: peter-evans/create-pull-request@v5 with: branch: master-promotion + title: 'Upgrade master from testing' + body: | + Upgrade master from testing From e03c677b793e0e17b3c26c169646fc0306703850 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 7 Oct 2023 05:06:36 +0000 Subject: [PATCH 4/5] Upgrade to v2023.10.1 --- manifest.toml | 2 +- scripts/_common.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index a3505e8..ca0b222 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Home Assistant" description.en = "Home automation platform" description.fr = "Plateforme domotique" -version = "2023.9.3~ynh1" +version = "2023.10.1~ynh1" maintainers = ["ewilly"] diff --git a/scripts/_common.sh b/scripts/_common.sh index edc3165..7d7a910 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,10 +5,10 @@ #================================================= # Release to install -app_version=2023.9.3 +app_version=2023.10.1 # Requirements -py_required_version=3.11.5 +py_required_version=3.11.6 pip_required="pip (>=21.3.1)" # Fail2ban From 54318350e40a6feba2c651f6a8b18d883bd77bdd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 7 Oct 2023 05:06:46 +0000 Subject: [PATCH 5/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14be310..a085f1b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Open source home automation that puts local control and privacy first. Powered b - Home Energy Management." -**Shipped version:** 2023.9.3~ynh1 +**Shipped version:** 2023.10.1~ynh1 **Demo:** https://demo.home-assistant.io diff --git a/README_fr.md b/README_fr.md index fdbdbec..5b10aa5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Open source home automation that puts local control and privacy first. Powered b - Home Energy Management." -**Version incluse :** 2023.9.3~ynh1 +**Version incluse :** 2023.10.1~ynh1 **Démo :** https://demo.home-assistant.io