Skip to content

Commit

Permalink
[toogoodtogo-ha-mqtt-bridge] Update toogoodtogo-ha-mqtt-bridge to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWinterstein committed Nov 28, 2024
1 parent abf5a03 commit 9a2ae47
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
5 changes: 5 additions & 0 deletions toogoodtogo-ha-mqtt-bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

<!-- towncrier release notes start -->

## [3.0.0.0] - 2024-11-28

- Update `toogoodtogo-ha-mqtt-bridge` to `3.0.0` (see [release notes](https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/releases))


## [2.5.1.3] - 2023-10-06

- Update base-image
Expand Down
23 changes: 19 additions & 4 deletions toogoodtogo-ha-mqtt-bridge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:11.0.6
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base-python:3.12-alpine3.20
FROM ${BUILD_FROM}

# install uv
# renovate: datasource=github-releases depName=uv packageName=astral-sh/uv
ENV UV_VERSION="0.5.5"
RUN pip install uv==$UV_VERSION

# add source and unpack
# renovate: datasource=github-releases depName=toogoodtogo-ha-mqtt-bridge packageName=MaxWinterstein/toogoodtogo-ha-mqtt-bridge
ARG TOOGOODTOGO_VERSION=2.5.1
ARG TOOGOODTOGO_VERSION=3.0.0
ADD "https://github.com/MaxWinterstein/toogoodtogo-ha-mqtt-bridge/archive/refs/tags/v${TOOGOODTOGO_VERSION}.tar.gz" /src.tar.gz
RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1
# as we want no full blown git checkout, but some nice version, we use the lazy man setuptools_scm env var
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${TOOGOODTOGO_VERSION}

# install
WORKDIR /app
RUN pip install -r requirements.txt
RUN python setup.py install

# Install dependencies
RUN uv sync --frozen --no-dev --index-strategy unsafe-best-match
# install all the other stuff
ADD rootfs /


# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

# Poor mans test if at least the imports work
RUN python toogoodtogo_ha_mqtt_bridge/main.py --version

# Corrects permissions for s6 v3
RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \
Expand Down
6 changes: 3 additions & 3 deletions toogoodtogo-ha-mqtt-bridge/build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build_from": {
"aarch64": "ghcr.io/hassio-addons/base-python/aarch64:11.0.6",
"amd64": "ghcr.io/hassio-addons/base-python/amd64:11.0.6",
"armv7": "ghcr.io/hassio-addons/base-python/armv7:11.0.6"
"aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.12-alpine3.20",
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.12-alpine3.20",
"armv7": "ghcr.io/home-assistant/armv7-base-python:3.12-alpine3.20"
}
}
2 changes: 1 addition & 1 deletion toogoodtogo-ha-mqtt-bridge/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: TooGoodToGo Home Assistant MQTT Bridge
version: 2.5.1.3
version: 3.0.0.0
image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch}
slug: tgtg-ha-mqtt-bridge
description: Publish TooGoodToGo stock as MQTT messages
Expand Down

0 comments on commit 9a2ae47

Please sign in to comment.