Compare commits
1 Commits
s-allius/i
...
update_cha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
982586ae26 |
4
.github/workflows/python-app.yml
vendored
4
.github/workflows/python-app.yml
vendored
@@ -5,7 +5,7 @@ name: Python application
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main", "dev-*", "*/issue*", "releases/*" ]
|
branches: [ "main", "dev-*", "*/issue*" ]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md' # Do no build on *.md changes
|
- '**.md' # Do no build on *.md changes
|
||||||
- '**.yml' # Do no build on *.yml changes
|
- '**.yml' # Do no build on *.yml changes
|
||||||
@@ -18,7 +18,7 @@ on:
|
|||||||
- '**.dockerfile' # Do no build on *.dockerfile changes
|
- '**.dockerfile' # Do no build on *.dockerfile changes
|
||||||
- '**.sh' # Do no build on *.sh changes
|
- '**.sh' # Do no build on *.sh changes
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main", "dev-*", "releases/*" ]
|
branches: [ "main", "dev-*" ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.13.5
|
3.13.2
|
||||||
|
|||||||
@@ -7,14 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [unreleased]
|
## [unreleased]
|
||||||
|
|
||||||
- Babel don't build new po file if only the pot creation-date was changed
|
|
||||||
- Improve Makefile
|
|
||||||
- Update dependency pytest-asyncio to v1
|
|
||||||
|
|
||||||
## [0.14.1] - 2025-05-31
|
|
||||||
|
|
||||||
- handle missing MQTT addon [#438](https://github.com/s-allius/tsun-gen3-proxy/issues/438)
|
|
||||||
|
|
||||||
## [0.14.0] - 2025-05-29
|
## [0.14.0] - 2025-05-29
|
||||||
|
|
||||||
- add-on: bump python to version 3.12.10-r1
|
- add-on: bump python to version 3.12.10-r1
|
||||||
|
|||||||
30
Makefile
30
Makefile
@@ -1,37 +1,27 @@
|
|||||||
.PHONY: help build babel clean addon-dev addon-debug addon-rc addon-rel debug dev preview rc rel check-docker-compose install
|
.PHONY: build babel clean addon-dev addon-debug addon-rc addon-rel debug dev preview rc rel check-docker-compose install
|
||||||
|
|
||||||
help: ## show help message
|
babel:
|
||||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
|
||||||
|
|
||||||
babel: ## build language files
|
|
||||||
$(MAKE) -C app $@
|
$(MAKE) -C app $@
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(MAKE) -C ha_addons $@
|
$(MAKE) -C ha_addons $@
|
||||||
|
|
||||||
clean: ## delete all built files
|
clean:
|
||||||
$(MAKE) -C app $@
|
$(MAKE) -C app $@
|
||||||
$(MAKE) -C ha_addons $@
|
$(MAKE) -C ha_addons $@
|
||||||
|
|
||||||
debug dev preview rc rel: ## build docker container in <dev|debg|rc|rel> version
|
debug dev preview rc rel:
|
||||||
$(MAKE) -C app babel
|
$(MAKE) -C app babel
|
||||||
$(MAKE) -C app $@
|
$(MAKE) -C app $@
|
||||||
|
|
||||||
addon-dev addon-debug addon-rc addon-rel: ## build HA add-on in <dev|debg|rc|rel> version
|
addon-dev addon-debug addon-rc addon-rel:
|
||||||
$(MAKE) -C app babel
|
$(MAKE) -C app babel
|
||||||
$(MAKE) -C ha_addons $(patsubst addon-%,%,$@)
|
$(MAKE) -C ha_addons $(patsubst addon-%,%,$@)
|
||||||
|
|
||||||
check-docker-compose: ## check the docker-compose file
|
check-docker-compose:
|
||||||
docker-compose config -q
|
docker-compose config -q
|
||||||
|
|
||||||
PY_VER := $(shell cat .python-version)
|
install:
|
||||||
|
python3 -m pip install --upgrade pip
|
||||||
install: ## install requirements into the pyenv and switch to proper venv
|
python3 -m pip install -r requirements.txt
|
||||||
@pyenv local $(PY_VER) || { pyenv install $(PY_VER) && pyenv local $(PY_VER) || exit 1; }
|
python3 -m pip install -r requirements-test.txt
|
||||||
@pyenv exec pip install --upgrade pip
|
|
||||||
@pyenv exec pip install -r requirements.txt
|
|
||||||
@pyenv exec pip install -r requirements-test.txt
|
|
||||||
pyenv exec python --version
|
|
||||||
|
|
||||||
run: ## run proxy locally out of the actual venv
|
|
||||||
pyenv exec python app/src/server.py -c /app/src/cnf
|
|
||||||
@@ -1 +1 @@
|
|||||||
0.15.0
|
0.14.0
|
||||||
@@ -55,7 +55,7 @@ $(BABEL_TRANSLATIONS)/%.pot : $(SRC)/.babel.cfg $(BABEL_INPUT)
|
|||||||
|
|
||||||
$(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.po : $(BABEL_TRANSLATIONS)/messages.pot
|
$(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.po : $(BABEL_TRANSLATIONS)/messages.pot
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@pybabel update --init-missing --ignore-pot-creation-date -i $< -d $(BABEL_TRANSLATIONS) -l $*
|
@pybabel update --init-missing -i $< -d $(BABEL_TRANSLATIONS) -l $*
|
||||||
|
|
||||||
$(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.mo : $(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.po
|
$(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.mo : $(BABEL_TRANSLATIONS)/%/LC_MESSAGES/messages.po
|
||||||
@pybabel compile -d $(BABEL_TRANSLATIONS) -l $*
|
@pybabel compile -d $(BABEL_TRANSLATIONS) -l $*
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
flake8==7.2.0
|
flake8==7.2.0
|
||||||
pytest==8.4.1
|
pytest==8.3.5
|
||||||
pytest-asyncio==1.0.0
|
pytest-asyncio==0.26.0
|
||||||
pytest-cov==6.2.1
|
pytest-cov==6.1.1
|
||||||
python-dotenv==1.1.0
|
python-dotenv==1.1.0
|
||||||
mock==5.2.0
|
mock==5.2.0
|
||||||
coverage==7.9.1
|
coverage==7.8.2
|
||||||
jinja2-cli==0.8.2
|
jinja2-cli==0.8.2
|
||||||
@@ -1,28 +1,18 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
bashio::log.blue "-----------------------------------------------------------"
|
echo "Add-on environment started"
|
||||||
bashio::log.blue "run.sh: info: setup Add-on environment"
|
|
||||||
bashio::cache.flush_all
|
echo "check for Home Assistant MQTT"
|
||||||
MQTT_HOST=""
|
|
||||||
if bashio::supervisor.ping; then
|
|
||||||
bashio::log "run.sh: info: check for Home Assistant MQTT service"
|
|
||||||
if bashio::services.available mqtt; then
|
|
||||||
MQTT_HOST=$(bashio::services mqtt "host")
|
MQTT_HOST=$(bashio::services mqtt "host")
|
||||||
MQTT_PORT=$(bashio::services mqtt "port")
|
MQTT_PORT=$(bashio::services mqtt "port")
|
||||||
MQTT_USER=$(bashio::services mqtt "username")
|
MQTT_USER=$(bashio::services mqtt "username")
|
||||||
MQTT_PASSWORD=$(bashio::services mqtt "password")
|
MQTT_PASSWORD=$(bashio::services mqtt "password")
|
||||||
else
|
|
||||||
bashio::log.yellow "run.sh: info: Home Assistant MQTT service not available!"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
bashio::log.red "run.sh: error: Home Assistant Supervisor API not available!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if a MQTT was/not found, drop a note
|
# if a MQTT was/not found, drop a note
|
||||||
if [ -z "$MQTT_HOST" ]; then
|
if [ -z "$MQTT_HOST" ]; then
|
||||||
bashio::log.yellow "run.sh: info: MQTT config not found"
|
echo "MQTT not found"
|
||||||
else
|
else
|
||||||
bashio::log.green "run.sh: info: MQTT config found"
|
echo "MQTT found"
|
||||||
export MQTT_HOST
|
export MQTT_HOST
|
||||||
export MQTT_PORT
|
export MQTT_PORT
|
||||||
export MQTT_USER
|
export MQTT_USER
|
||||||
@@ -39,6 +29,5 @@ cd /home/proxy || exit
|
|||||||
|
|
||||||
export VERSION=$(cat /proxy-version.txt)
|
export VERSION=$(cat /proxy-version.txt)
|
||||||
|
|
||||||
bashio::log.blue "run.sh: info: Start Proxyserver..."
|
echo "Start Proxyserver..."
|
||||||
bashio::log.blue "-----------------------------------------------------------"
|
|
||||||
python3 server.py --rel_urls --json_config=/data/options.json --log_path=/homeassistant/tsun-proxy/logs/ --config_path=/homeassistant/tsun-proxy/ --log_backups=2
|
python3 server.py --rel_urls --json_config=/data/options.json --log_path=/homeassistant/tsun-proxy/logs/ --config_path=/homeassistant/tsun-proxy/ --log_backups=2
|
||||||
|
|||||||
Reference in New Issue
Block a user