mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 07:26:28 +00:00
Using image name from version file (#1437)
* Using image name from version file * Use jq for arch/machine substitution Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
48c3c8ccdf
commit
cd0c9032d3
@ -26,20 +26,22 @@ while [[ $# -gt 0 ]]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
SUPERVISOR="homeassistant/${ARCH}-hassio-supervisor"
|
VERSION_JSON="$(curl -s ${VERSION_URL})"
|
||||||
DNS="homeassistant/${ARCH}-hassio-dns"
|
|
||||||
AUDIO="homeassistant/${ARCH}-hassio-audio"
|
|
||||||
CLI="homeassistant/${ARCH}-hassio-cli"
|
|
||||||
MULTICAST="homeassistant/${ARCH}-hassio-multicast"
|
|
||||||
OBSERVER="homeassistant/${ARCH}-hassio-observer"
|
|
||||||
LANDINGPAGE="homeassistant/${MACHINE}-homeassistant:landingpage"
|
|
||||||
|
|
||||||
SUPERVISOR_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.supervisor')
|
SUPERVISOR=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.supervisor | sub("{arch}"; $arch)')
|
||||||
DNS_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.dns')
|
DNS=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.dns | sub("{arch}"; $arch)')
|
||||||
CLI_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.cli')
|
AUDIO=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.audio | sub("{arch}"; $arch)')
|
||||||
AUDIO_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.audio')
|
CLI=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.cli | sub("{arch}"; $arch)')
|
||||||
MULTICAST_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.multicast')
|
MULTICAST=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.multicast | sub("{arch}"; $arch)')
|
||||||
OBSERVER_VERSION=$(curl -s ${VERSION_URL} | jq -e -r '.observer')
|
OBSERVER=$(echo "${VERSION_JSON}" | jq -e -r --arg arch "${ARCH}" '.images.observer | sub("{arch}"; $arch)')
|
||||||
|
LANDINGPAGE=$(echo "${VERSION_JSON}" | jq -e -r --arg machine "${MACHINE}" '.images.core | sub("{machine}"; $machine)'):landingpage
|
||||||
|
|
||||||
|
SUPERVISOR_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.supervisor')
|
||||||
|
DNS_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.dns')
|
||||||
|
CLI_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.cli')
|
||||||
|
AUDIO_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.audio')
|
||||||
|
MULTICAST_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.multicast')
|
||||||
|
OBSERVER_VERSION=$(echo "${VERSION_JSON}" | jq -e -r '.observer')
|
||||||
|
|
||||||
# Make image
|
# Make image
|
||||||
dd if=/dev/zero of=${DATA_IMG} bs=1G count=1
|
dd if=/dev/zero of=${DATA_IMG} bs=1G count=1
|
||||||
@ -73,7 +75,9 @@ done
|
|||||||
|
|
||||||
# Install supervisor
|
# Install supervisor
|
||||||
docker pull "${SUPERVISOR}:${SUPERVISOR_VERSION}"
|
docker pull "${SUPERVISOR}:${SUPERVISOR_VERSION}"
|
||||||
docker tag "${SUPERVISOR}:${SUPERVISOR_VERSION}" "${SUPERVISOR}:latest"
|
|
||||||
|
# Need match with the tag used by OS
|
||||||
|
docker tag "${SUPERVISOR}:${SUPERVISOR_VERSION}" "homeassistant/${ARCH}-hassio-supervisor:latest"
|
||||||
|
|
||||||
# Install Plugins
|
# Install Plugins
|
||||||
docker pull "${CLI}:${CLI_VERSION}"
|
docker pull "${CLI}:${CLI_VERSION}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user