From 9e08ede0f9c564a8eca005e0a29fdb832b230041 Mon Sep 17 00:00:00 2001 From: Allan Clark Date: Tue, 5 May 2020 05:06:58 -0700 Subject: [PATCH] git_pull: delete key file first so we are not always appending (#1218) --- git_pull/CHANGELOG.md | 4 ++++ git_pull/config.json | 2 +- git_pull/data/run.sh | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/git_pull/CHANGELOG.md b/git_pull/CHANGELOG.md index 5d4dc6d..f3ac370 100644 --- a/git_pull/CHANGELOG.md +++ b/git_pull/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 7.12 + +- Fix error of deployment_key eventually failing by overwriting the deployment_key every cycle + ## 7.11 - Update Home Assistant CLI to 4.2.0 diff --git a/git_pull/config.json b/git_pull/config.json index 8083d4e..99125de 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -1,6 +1,6 @@ { "name": "Git pull", - "version": "7.11", + "version": "7.12", "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 7eedaf8..c772bc3 100755 --- a/git_pull/data/run.sh +++ b/git_pull/data/run.sh @@ -30,6 +30,7 @@ function add-ssh-key { ) > ~/.ssh/config echo "[Info] Setup deployment_key on id_${DEPLOYMENT_KEY_PROTOCOL}" + rm -f "${HOME}/.ssh/id_${DEPLOYMENT_KEY_PROTOCOL}" while read -r line; do echo "$line" >> "${HOME}/.ssh/id_${DEPLOYMENT_KEY_PROTOCOL}" done <<< "$DEPLOYMENT_KEY"