mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Merge pull request #1 from YunoHost-Apps/master
merge origin master to rosbeef master
This commit is contained in:
commit
bdd6c58922
6 changed files with 31 additions and 68 deletions
26
.github/workflows/update_master.yml
vendored
Normal file
26
.github/workflows/update_master.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
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
|
||||
title: 'Upgrade master from testing'
|
||||
body: |
|
||||
Upgrade master from testing
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue