mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 13:44:20 +01:00
git_pull: fix restart_ignore for subdirectories (#516)
* git_pull: fix restart_ignore for subdirectories * Update config.json * Update CHANGELOG.md
This commit is contained in:
committed by
Pascal Vizeli
parent
a84f63cc76
commit
9f2d6102ce
@@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 7.2
|
||||||
|
- Fix restart_ignore when specifying a sub-directory
|
||||||
|
|
||||||
## 7.1
|
## 7.1
|
||||||
- Enhance restart_ignore to support whole directories
|
- Enhance restart_ignore to support whole directories
|
||||||
- Fix repeat option: don't terminate if internet connection unavailable during a check
|
- Fix repeat option: don't terminate if internet connection unavailable during a check
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Git pull",
|
"name": "Git pull",
|
||||||
"version": "7.1",
|
"version": "7.2",
|
||||||
"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/",
|
||||||
|
|||||||
@@ -185,14 +185,14 @@ function validate-config {
|
|||||||
for changed_file in $CHANGED_FILES; do
|
for changed_file in $CHANGED_FILES; do
|
||||||
restart_required_file=""
|
restart_required_file=""
|
||||||
for restart_ignored_file in $RESTART_IGNORED_FILES; do
|
for restart_ignored_file in $RESTART_IGNORED_FILES; do
|
||||||
if [ -z "${restart_ignored_file#*/}" ]; then
|
if [ -d "$restart_ignored_file" ]; then
|
||||||
# file to be ignored is a whole dir
|
# file to be ignored is a whole dir
|
||||||
restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}")
|
restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}")
|
||||||
else
|
else
|
||||||
restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}$")
|
restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}$")
|
||||||
fi
|
fi
|
||||||
# break on first match
|
# break on first match
|
||||||
if [ -n "$restart_required_file" ]; then break ; fi
|
if [ -n "$restart_required_file" ]; then break; fi
|
||||||
done
|
done
|
||||||
if [ -z "$restart_required_file" ]; then
|
if [ -z "$restart_required_file" ]; then
|
||||||
DO_RESTART="true"
|
DO_RESTART="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user