git_pull: fix for home-assistant/hassio-addons#480 (#481)

* git_pull: fix git diff command - #480

* git_pull: version bump & update CHANGELOG
This commit is contained in:
Fréderic Kinnaer
2018-12-13 10:51:26 +01:00
committed by Pascal Vizeli
parent 65082b5361
commit 96c9f0c020
3 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
# Changelog # Changelog
## 6.1
- Bugfix in git diff command while comparing branches
## 6 ## 6
- Allow to disable Home Assistant restart for specific file changes - Allow to disable Home Assistant restart for specific file changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "Git pull", "name": "Git pull",
"version": "6", "version": "6.1",
"slug": "git_pull", "slug": "git_pull",
"description": "Simple git pull to update the local configuration", "description": "Simple git pull to update the local configuration",
"url": "https://home-assistant.io/addons/git_pull/", "url": "https://home-assistant.io/addons/git_pull/",

View File

@@ -179,7 +179,7 @@ function validate-config {
if hassio homeassistant check; then if hassio homeassistant check; then
if [ "$AUTO_RESTART" == "true" ]; then if [ "$AUTO_RESTART" == "true" ]; then
DO_RESTART="false" DO_RESTART="false"
CHANGED_FILES=$(git diff "$OLD_COMMIT" .. "$NEW_COMMIT" --name-only) CHANGED_FILES=$(git diff "$OLD_COMMIT" "$NEW_COMMIT" --name-only)
echo "Changed Files: $CHANGED_FILES" echo "Changed Files: $CHANGED_FILES"
if [ -n "$RESTART_IGNORED_FILES" ]; then if [ -n "$RESTART_IGNORED_FILES" ]; then
for file in $CHANGED_FILES; do for file in $CHANGED_FILES; do