mirror of
https://github.com/hassio-addons/addon-airsonos.git
synced 2025-05-04 11:01:31 +00:00
🤖 Fetch AirConnect on build time, let Renovate handle upgrades (#156)
This commit is contained in:
parent
855bf49268
commit
6a7f4b49eb
5 changed files with 32 additions and 2 deletions
8
.github/renovate.json
vendored
8
.github/renovate.json
vendored
|
@ -14,6 +14,14 @@
|
|||
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
|
||||
],
|
||||
"datasourceTemplate": "docker"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStrings": [
|
||||
"ARG AIRCONNECT_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "philippe44/AirConnect"
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
|
|
|
@ -8,9 +8,31 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
# Add airsonos binary
|
||||
# Setup base
|
||||
ARG BUILD_ARCH=amd64
|
||||
COPY bin/airsonos-${BUILD_ARCH} /usr/bin/airsonos
|
||||
ARG AIRCONNECT_VERSION="1.2.0"
|
||||
RUN \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
unzip=6.0-28 \
|
||||
\
|
||||
&& curl -J -L -o /tmp/airconnect.zip \
|
||||
"https://github.com/philippe44/AirConnect/releases/download/${AIRCONNECT_VERSION}/AirConnect-${AIRCONNECT_VERSION}.zip" \
|
||||
&& unzip -d /tmp /tmp/airconnect.zip \
|
||||
\
|
||||
&& if [ "${BUILD_ARCH}" = "aarch64" ]; then AIRCONNECT_ARCH="aarch64"; \
|
||||
elif [ "${BUILD_ARCH}" = "amd64" ]; then AIRCONNECT_ARCH="x86_64"; \
|
||||
elif [ "${BUILD_ARCH}" = "armv7" ]; then AIRCONNECT_ARCH="arm"; fi \
|
||||
\
|
||||
&& cp "/tmp/airupnp-linux-${AIRCONNECT_ARCH}-static" /usr/bin/airsonos \
|
||||
&& chmod a+x /usr/bin/airsonos \
|
||||
\
|
||||
&& apt-get purge -y --auto-remove \
|
||||
unzip \
|
||||
&& rm -fr \
|
||||
/tmp/* \
|
||||
/var/{cache,log}/* \
|
||||
/var/lib/apt/lists/*
|
||||
|
||||
# Build arguments
|
||||
ARG BUILD_ARCH
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue