From b97f780179ba55ef2ddb9419ff067d1007fbb21d Mon Sep 17 00:00:00 2001 From: Daniel Riedl <107212962+danriedl@users.noreply.github.com> Date: Sat, 6 May 2023 20:51:13 +0200 Subject: [PATCH] fix(homeassistant): Ensure appended config files start on new line. (#8784) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Used this as fix on my home-assistant chart. Here's the initial problem: ```sh $ cat recorder.txt recorder: purge_keep_days: 30 commit_interval: 3 db_url: xyz $ cat config.yaml test: 123 nest: x: 1 y: 2 $ cat recorder.txt >> config.yaml $ cat config.yaml test: 123 nest: x: 1 y: 2recorder: purge_keep_days: 30 commit_interval: 3 db_url: xyz ``` **📃 Notes:** **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [x] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ Signed-off-by: Daniel Riedl <107212962+danriedl@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/stable/home-assistant/Chart.yaml | 2 +- charts/stable/home-assistant/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/stable/home-assistant/Chart.yaml b/charts/stable/home-assistant/Chart.yaml index 729a055ec04..41f0a6810f7 100644 --- a/charts/stable/home-assistant/Chart.yaml +++ b/charts/stable/home-assistant/Chart.yaml @@ -23,7 +23,7 @@ sources: - https://github.com/home-assistant/home-assistant - https://github.com/cdr/code-server type: application -version: 19.0.15 +version: 19.0.16 annotations: truecharts.org/catagories: | - home-automation diff --git a/charts/stable/home-assistant/values.yaml b/charts/stable/home-assistant/values.yaml index 0d8de4b019a..82af790f2cb 100644 --- a/charts/stable/home-assistant/values.yaml +++ b/charts/stable/home-assistant/values.yaml @@ -59,11 +59,13 @@ configmap: if grep -q recorder: "$config_file"; then echo "configuration.yaml already contains recorder" else + echo "" >> "$config_file" cat /config/init/recorder.default >> "$config_file" fi if grep -q http: "$config_file"; then echo "configuration.yaml already contains http section" else + echo "" >> "$config_file" cat /config/init/http.default >> "$config_file" fi else