mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
Use reflog to calculate diff and allow 'git://' repo addresses (#198)
* use reflog instead of ORIG_HEAD to get the changes * Allow git:// URLS too Requiring url in repo only allows for https addresses * trying to fix the tests and regex match * fix lint
This commit is contained in:
committed by
Pascal Vizeli
parent
fcb9a37c78
commit
c077c9fb8d
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Git pull",
|
||||
"version": "2.0",
|
||||
"version": "2.1",
|
||||
"slug": "git_pull",
|
||||
"description": "Simple git pull to update the local configuration",
|
||||
"url": "https://home-assistant.io/addons/git_pull/",
|
||||
@@ -21,7 +21,7 @@
|
||||
"schema": {
|
||||
"deployment_key": ["str"],
|
||||
"deployment_key_protocol": "match(rsa|dsa|ecdsa|ed25519|rsa)",
|
||||
"repository": "url",
|
||||
"repository": "match((?:git|ssh|https?|git@[-\\w.]+):(\/\/)?(.*?)(\\.git)(\/?|\\#[-\\d\\w._]+?))",
|
||||
"auto_restart": "bool",
|
||||
"repeat": {
|
||||
"active": "bool",
|
||||
|
||||
@@ -43,7 +43,7 @@ while true; do
|
||||
|
||||
# Enable autorestart of homeassistant
|
||||
if [ "$AUTO_RESTART" == "true" ]; then
|
||||
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
|
||||
changed_files="$(git diff-tree -r --name-only --no-commit-id 'HEAD@{1}' HEAD)"
|
||||
|
||||
# Files have changed & check config
|
||||
if [ ! -z "$changed_files" ]; then
|
||||
|
||||
Reference in New Issue
Block a user