From 397c476c7144f78b54225990a0c785d51e5abfb1 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 19 Feb 2020 15:43:09 +0100 Subject: [PATCH] Migrate GitPull new CLI (#1109) * Migrate GitPull new CLI * fix naming --- git_pull/CHANGELOG.md | 4 ++++ git_pull/Dockerfile | 6 +++--- git_pull/build.json | 2 +- git_pull/config.json | 2 +- git_pull/data/run.sh | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/git_pull/CHANGELOG.md b/git_pull/CHANGELOG.md index 6d6916a..ea55bcf 100644 --- a/git_pull/CHANGELOG.md +++ b/git_pull/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 7.9 + +- Update Home Assistant CLI to 4.0.1 + ## 7.8 - Added support for Azure DevOps repositories by removing the requirement for the `.git` suffix diff --git a/git_pull/Dockerfile b/git_pull/Dockerfile index d9d7943..732139a 100644 --- a/git_pull/Dockerfile +++ b/git_pull/Dockerfile @@ -7,9 +7,9 @@ RUN apk add --no-cache jq curl git openssh-client # Home Assistant CLI ARG BUILD_ARCH ARG CLI_VERSION -RUN curl -Lso /usr/bin/hassio \ - "https://github.com/home-assistant/hassio-cli/releases/download/${CLI_VERSION}/hassio_${BUILD_ARCH}" \ - && chmod a+x /usr/bin/hassio +RUN curl -Lso /usr/bin/ha \ + "https://github.com/home-assistant/cli/releases/download/${CLI_VERSION}/ha_${BUILD_ARCH}" \ + && chmod a+x /usr/bin/ha # Copy data COPY data/run.sh / diff --git a/git_pull/build.json b/git_pull/build.json index 1680863..2b1cc3a 100644 --- a/git_pull/build.json +++ b/git_pull/build.json @@ -7,6 +7,6 @@ "i386": "homeassistant/i386-base:3.11" }, "args": { - "CLI_VERSION": "3.1.1" + "CLI_VERSION": "4.0.1" } } diff --git a/git_pull/config.json b/git_pull/config.json index c22a1a4..4a30c9f 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -1,6 +1,6 @@ { "name": "Git pull", - "version": "7.8", + "version": "7.9", "slug": "git_pull", "description": "Simple git pull to update the local configuration", "url": "https://github.com/home-assistant/hassio-addons/tree/master/git_pull", diff --git a/git_pull/data/run.sh b/git_pull/data/run.sh index 8e19fb3..7eedaf8 100755 --- a/git_pull/data/run.sh +++ b/git_pull/data/run.sh @@ -176,7 +176,7 @@ function validate-config { NEW_COMMIT=$(git rev-parse HEAD) if [ "$NEW_COMMIT" != "$OLD_COMMIT" ]; then echo "[Info] Something has changed, checking Home-Assistant config..." - if hassio --no-progress homeassistant check; then + if ha --no-progress core check; then if [ "$AUTO_RESTART" == "true" ]; then DO_RESTART="false" CHANGED_FILES=$(git diff "$OLD_COMMIT" "$NEW_COMMIT" --name-only) @@ -204,7 +204,7 @@ function validate-config { fi if [ "$DO_RESTART" == "true" ]; then echo "[Info] Restart Home-Assistant" - hassio --no-progress homeassistant restart 2&> /dev/null + ha --no-progress core restart 2&> /dev/null else echo "[Info] No Restart Required, only ignored changes detected" fi