Update eufy-ha-mqtt-bridge to prebuild images

This commit is contained in:
Max Winterstein
2021-02-15 07:58:42 +01:00
parent 12f6ba34fd
commit 257b45b777
8 changed files with 71 additions and 52 deletions

View File

@@ -5,7 +5,7 @@ echo "Newest version of eufy-ha-mqtt-bridge: $MQTT_BRIDGE_VERSION"
echo "MQTT_BRIDGE_VERSION=$MQTT_BRIDGE_VERSION" >> $GITHUB_ENV
echo "Check if $MQTT_BRIDGE_VERSION is already used..."
grep "ARG VERSION=${MQTT_BRIDGE_VERSION}" Dockerfile-real && { echo "Version is the same, nothing to do"; exit 0; } || echo "Version is different, will continue..."
grep "ARG VERSION=${MQTT_BRIDGE_VERSION}" Dockerfile && { echo "Version is the same, nothing to do"; exit 0; } || echo "Version is different, will continue..."
echo "CONTINUE=true" >> $GITHUB_ENV;
echo "Reading current addon version"
@@ -16,8 +16,7 @@ echo "Update config..."
sed -i.bak "s|\ \ \"version\": \".*$|\ \ \"version\": \"$ADDON_NEXT_VERSION\",|" config.json
echo "Update Dockerfile..."
sed -i.bak "s|eufy-ha-mqtt-bridge:.*$|eufy-ha-mqtt-bridge:${ADDON_NEXT_VERSION}|" Dockerfile
sed -i.bak "s|VERSION=.*$|VERSION=${MQTT_BRIDGE_VERSION}|" Dockerfile-real
sed -i.bak "s|VERSION=.*$|VERSION=${MQTT_BRIDGE_VERSION}|" Dockerfile
echo "Update CHANGELOG..."
sed -i.bak "2 a ## [${ADDON_NEXT_VERSION}] - $(date +%Y-%m-%d)" CHANGELOG.md