git_pull: Prevent plugin from always restarting hass.io even if nothing has changed (#205)

* Prevent git module from always restarting hass.io

`git diff-tree -r --name-only --no-commit-id 'HEAD@{1}' HEAD)` always shows a difference. Getting the commit id prior to pulling is easy and comparing it to the one after pulling makes sure, that checking and restart is only done if ids have changed.

* Forgot to get the OLD_COMMIT id

* Better sorting and further comments

* Pleasing the linter

* Update config.json
This commit is contained in:
Julian Kaffke
2017-12-04 12:44:51 +01:00
committed by Pascal Vizeli
parent 61a6e7cefe
commit 2bc8d29eb4
2 changed files with 14 additions and 6 deletions

View File

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