Skip to content

Commit

Permalink
Allow Configurator to skip git initialization (home-assistant#1669)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <[email protected]>
  • Loading branch information
tomer-w and frenck authored Nov 6, 2020
1 parent b5f3e65 commit e1edc21
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions configurator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.2.0

- Add git option which allows disabling the (default) git initialization

## 5.1.0

- Update base image to Alpine 3.12
Expand Down
5 changes: 5 additions & 0 deletions configurator/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Add-on configuration:
```yaml
dirsfirst: false
enforce_basepath: false
git: true
ignore_pattern:
- __pycache__
ssh_keys: []
Expand All @@ -39,6 +40,10 @@ Set it to `true` to list directories first, `false` otherwise.

If set to `true`, access is limited to files within the `/config` directory.

### Option: `git` (required)

If set to `true`, add-on will initialize git for directories which support it.

### Option: `ignore_pattern` (required)

This option allows you to hide files and folders from the file browser tree.
Expand Down
4 changes: 3 additions & 1 deletion configurator/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "File editor",
"version": "5.1.0",
"version": "5.2.0",
"slug": "configurator",
"description": "Simple browser-based file editor for Home Assistant",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/configurator",
Expand All @@ -16,12 +16,14 @@
"options": {
"dirsfirst": false,
"enforce_basepath": true,
"git": true,
"ignore_pattern": ["__pycache__", ".cloud", ".storage", "deps"],
"ssh_keys": []
},
"schema": {
"dirsfirst": "bool",
"enforce_basepath": "bool",
"git": "bool",
"ignore_pattern": ["str"],
"ssh_keys": ["str"]
},
Expand Down
2 changes: 2 additions & 0 deletions configurator/rootfs/etc/services.d/configurator/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# ==============================================================================
export HC_DIRSFIRST
export HC_ENFORCE_BASEPATH
export HC_GIT
export HC_HASS_API_PASSWORD
export HC_IGNORE_PATTERN

Expand All @@ -27,6 +28,7 @@ fi
# Setup and run configurator
HC_DIRSFIRST=$(bashio::config 'dirsfirst')
HC_ENFORCE_BASEPATH=$(bashio::config 'enforce_basepath')
HC_GIT=$(bashio::config 'git')
HC_HASS_API_PASSWORD="${SUPERVISOR_TOKEN}"
HC_IGNORE_PATTERN="$(bashio::config 'ignore_pattern | join(",")')"

Expand Down

0 comments on commit e1edc21

Please sign in to comment.