Compare commits

..

3 Commits

Author SHA1 Message Date
Andreas Wrede 6fb67f8615 version 5.1.10
Release / release (push) Successful in 5s
2026-05-01 13:50:15 -04:00
Andreas Wrede e70ae6f176 fix: change version in hbc_mini as well 2026-05-01 13:50:04 -04:00
Andreas Wrede a77f6d380c fix: install script should not copy over itself 2026-05-01 12:48:29 -04:00
5 changed files with 24 additions and 11 deletions
+1 -1
View File
@@ -14,4 +14,4 @@ Install options:
"""
__all__ = ["__version__"]
__version__ = "5.1.9"
__version__ = "5.1.10"
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hbd"
version = "5.1.9"
version = "5.1.10"
description = "Heartbeat monitoring system — client (hbc) and server (hbd)"
readme = "README.md"
requires-python = ">=3.11"
+3 -1
View File
@@ -4,12 +4,14 @@ set -e
uv version --bump patch
VER=$(uv version --short)
sed -i".bak" "s/__version__ = \"[0-9.]*\"\(.*\)$/__version__ = \"$VER\"\1/" hbd/__init__.py
sed -i".bak" "s/__version__ = \"[0-9.]*\"\(.*\)$/__version__ = \"$VER\"\1/" scripts/hbc_mini.py
# commit pyproject.toml
git commit -m "version $VER" pyproject.toml hbd/__init__.py
git commit -m "version $VER" pyproject.toml hbd/__init__.py scripts/hbc_mini.py
git push
# tag version
git tag -a v$VER -m "Version $VER"
git push --tags
rm hbd/__init__.py.bak
rm scripts/hbc_mini.py.bak
+14 -6
View File
@@ -14,12 +14,13 @@ what=$1
on_ha=0
where=""
venv=""
prog=$(realpath $0)
[ "$2" = "HA" ] && on_ha=1
[ -z "$what" ] && what="client"
if [ -d /homeassistant ]; then
echo "HA, running \"docker exec homeassistant $0 $@\""
docker exec homeassistant $0 $@ HA
echo "HA, running \"docker exec homeassistant $prog $@\""
docker exec homeassistant $prog $@ HA
rc=$?
if [ $rc -ne 0 ]; then
echo "Failed to install heartbeat in HA, please check the logs for more details"
@@ -88,7 +89,14 @@ else
echo "Installing heartbeat $what in virtual environment $venv/hbd"
. $venv/hbd/bin/activate
fi
python3 -mpip install --upgrade --index-url https://git.wrede.ca/api/packages/andreas/pypi/simple/ --extra-index-url https://pypi.org/simple hbd[$what]
if [ "$what" = "mini" ]; then
echo "Installing hbc mini, which has no external dependencies and is meant for quick setup and testing. For the full client with all features, please run this script with the 'client' argument."
curl -s -o $where/hbc_mini https://git.wrede.ca/andreas/heartbeat/raw/branch/master/scripts/hbc_mini.py
chmod +x $where/hbc_mini
else
echo "Installing heartbeat $what, which includes the full client with all features. If you want to install the minimal client with no external dependencies, please run this script with the 'mini' argument."
python3 -mpip install --upgrade --index-url https://git.wrede.ca/api/packages/andreas/pypi/simple/ --extra-index-url https://pypi.org/simple hbd[$what]
fi
if [ "$what" = "server" ]; then
rm -f $where/hbd
@@ -104,8 +112,8 @@ elif [ "$what" = "client" ]; then
rm -f $where/hbc
ln -sf $(which hbc) $where/hbc
fi
if [ "$0" != "$where/hb_install.sh" ]; then
cp "$0" $where/hb_install.sh
if [ "$prog" != "$where/hb_install.sh" ]; then
cp "$prog" $where/hb_install.sh
chmod +x $where/hb_install.sh
fi
if [ $on_ha -eq 1 ]; then
@@ -118,7 +126,7 @@ elif [ "$what" = "client" ]; then
elif [ "$what" = "mini" ]; then
hbc_path=$(which hbc_mini)
if [ "$hbc_path" != "$where/hbc_mini" ]; then
ln -sf $(which hbc) $where/hbc_mini
ln -sf $hbc_path $where/hbc_mini
fi
echo "hbc mini installed, you can run it with \"$where/hbc_mini\" or \"hbc_mini\" if $where is in your PATH"
fi
+5 -2
View File
@@ -40,6 +40,9 @@ from logging.handlers import SysLogHandler
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
# updated by scripts/bumpminor.sh
__version__ = "5.1.10"
# ---------------------------------------------------------------------------
# Protocol (mirrors hbd/common/proto.py)
# ---------------------------------------------------------------------------
@@ -233,7 +236,7 @@ class OSInfoPlugin(InfoPlugin):
"machine": platform.machine(),
"architecture": platform.architecture()[0],
"python_version": platform.python_version(),
"hbc_version": "5.1.8",
"hbc_version": __version__,
"hbc_type": "mini",
}
if platform.system() == "Linux":
@@ -875,7 +878,7 @@ async def _handle_update(conn: AsyncConnection):
log.info("running installer: %s", installer)
try:
proc = await asyncio.create_subprocess_exec(
installer, "miniclient",
installer, "mini",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT,
)