convert LF

This commit is contained in:
Alexandre
2021-10-18 17:00:48 +02:00
parent 899c6e5b79
commit 39acb510bb
9 changed files with 109 additions and 109 deletions

View File

@@ -1,4 +1,5 @@
# Home assistant add-on: addons updater # Home assistant add-on: addons updater
![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] ![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
## About ## About
@@ -34,7 +35,6 @@ gituser: your github email
gitpass: add your github password here, or a specific key if you have two factor identification enabled gitpass: add your github password here, or a specific key if you have two factor identification enabled
``` ```
[repository]: https://github.com/alexbelgium/hassio-addons [repository]: https://github.com/alexbelgium/hassio-addons
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg

View File

@@ -1,8 +1,8 @@
{ {
"build_from": { "build_from": {
"aarch64": "homeassistant/aarch64-base-python:3.9-alpine3.13", "aarch64": "homeassistant/aarch64-base-python:3.9-alpine3.13",
"armhf": "homeassistant/armhf-base-python:3.9-alpine3.13", "armhf": "homeassistant/armhf-base-python:3.9-alpine3.13",
"armv7": "homeassistant/armv7-base-python:3.9-alpine3.13", "armv7": "homeassistant/armv7-base-python:3.9-alpine3.13",
"amd64": "homeassistant/amd64-base-python:3.9-alpine3.13" "amd64": "homeassistant/amd64-base-python:3.9-alpine3.13"
} }
} }

View File

@@ -1,35 +1,45 @@
{ {
"name": "Addons_Updater", "name": "Addons_Updater",
"version": "3.2", "version": "3.2",
"slug": "updater", "slug": "updater",
"description": "Automatic addons update by aligning version tag with upstream releases", "description": "Automatic addons update by aligning version tag with upstream releases",
"url": "https://github.com/alexbelgium/hassio-addons", "url": "https://github.com/alexbelgium/hassio-addons",
"arch": [ "arch": ["aarch64", "amd64", "armv7", "armhf"],
"aarch64", "ports": {},
"amd64", "ports_description": {},
"armv7",
"armhf"
],
"ports": {
},
"ports_description": {
},
"startup": "once", "startup": "once",
"boot": "manual", "boot": "manual",
"environment": { "GIT_DISCOVERY_ACROSS_FILESYSTEM": "1" }, "environment": { "GIT_DISCOVERY_ACROSS_FILESYSTEM": "1" },
"options": { "options": {
"addon": [{ "slug": "addon slug", "beta": false, "fulltag": false, "repository": "https://github.com/user/repo", "upstream": "github_user/repo_name" }], "addon": [
"gituser": "gituser", {
"gitpass": "gitpassword", "slug": "addon slug",
"gitmail": "youremail@gmail.com", "beta": false,
"verbose": true "fulltag": false,
"repository": "https://github.com/user/repo",
"upstream": "github_user/repo_name"
}
],
"gituser": "gituser",
"gitpass": "gitpassword",
"gitmail": "youremail@gmail.com",
"verbose": true
}, },
"schema": { "schema": {
"addon": [{ "slug": "str", "beta": "bool", "fulltag": "bool", "having_asset": "bool?", "repository": "str", "upstream": "str"}], "addon": [
"gituser": "str", {
"gitpass": "str", "slug": "str",
"gitmail": "str", "beta": "bool",
"gitapi": "str?", "fulltag": "bool",
"verbose": "bool" "having_asset": "bool?",
"repository": "str",
"upstream": "str"
}
],
"gituser": "str",
"gitpass": "str",
"gitmail": "str",
"gitapi": "str?",
"verbose": "bool"
} }
} }

View File

@@ -5,36 +5,36 @@
########## ##########
if bashio::supervisor.ping; then if bashio::supervisor.ping; then
bashio::log.blue \ bashio::log.blue \
'-----------------------------------------------------------' '-----------------------------------------------------------'
bashio::log.blue " Add-on: $(bashio::addon.name)" bashio::log.blue " Add-on: $(bashio::addon.name)"
bashio::log.blue " $(bashio::addon.description)" bashio::log.blue " $(bashio::addon.description)"
bashio::log.blue \ bashio::log.blue \
'-----------------------------------------------------------' '-----------------------------------------------------------'
bashio::log.blue " Add-on version: $(bashio::addon.version)" bashio::log.blue " Add-on version: $(bashio::addon.version)"
if bashio::var.true "$(bashio::addon.update_available)"; then if bashio::var.true "$(bashio::addon.update_available)"; then
bashio::log.magenta ' There is an update available for this add-on!' bashio::log.magenta ' There is an update available for this add-on!'
bashio::log.magenta \ bashio::log.magenta \
" Latest add-on version: $(bashio::addon.version_latest)" " Latest add-on version: $(bashio::addon.version_latest)"
bashio::log.magenta ' Please consider upgrading as soon as possible.' bashio::log.magenta ' Please consider upgrading as soon as possible.'
else else
bashio::log.green ' You are running the latest version of this add-on.' bashio::log.green ' You are running the latest version of this add-on.'
fi fi
bashio::log.blue " System: $(bashio::info.operating_system)" \ bashio::log.blue " System: $(bashio::info.operating_system)" \
" ($(bashio::info.arch) / $(bashio::info.machine))" " ($(bashio::info.arch) / $(bashio::info.machine))"
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)" bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)" bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
bashio::log.blue \ bashio::log.blue \
'-----------------------------------------------------------' '-----------------------------------------------------------'
bashio::log.blue \ bashio::log.blue \
' Please, share the above information when looking for help' ' Please, share the above information when looking for help'
bashio::log.blue \ bashio::log.blue \
' or support in, e.g., GitHub, forums or the Discord chat.' ' or support in, e.g., GitHub, forums or the Discord chat.'
bashio::log.blue \ bashio::log.blue \
'-----------------------------------------------------------' '-----------------------------------------------------------'
fi fi
########## ##########
@@ -84,7 +84,8 @@ for addons in $(bashio::config "addon|keys"); do
else else
LOGINFO="... $SLUG : updating ${REPOSITORY}" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi LOGINFO="... $SLUG : updating ${REPOSITORY}" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
cd "/data/$BASENAME" cd "/data/$BASENAME"
git pull --rebase &>/dev/null || git reset --hard &>/dev/null; git pull --rebase &>/dev/null git pull --rebase &>/dev/null || git reset --hard &>/dev/null
git pull --rebase &>/dev/null
fi fi
#Define the folder addon #Define the folder addon
@@ -119,7 +120,7 @@ for addons in $(bashio::config "addon|keys"); do
LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET) LASTVERSION=$(lastversion --pre "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET)
else else
LOGINFO="... $SLUG : beta is off" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi LOGINFO="... $SLUG : beta is off" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET) LASTVERSION=$(lastversion "https://github.com/$UPSTREAM" $FULLTAG $HAVINGASSET)
fi fi
# Add brackets # Add brackets
@@ -136,12 +137,12 @@ for addons in $(bashio::config "addon|keys"); do
#Change all instances of version #Change all instances of version
LOGINFO="... $SLUG : updating files" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi LOGINFO="... $SLUG : updating files" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/config.json sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/config.json
sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/Dockerfile || true #Allow absence of Dockerfile sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/Dockerfile || true #Allow absence of Dockerfile
[ -f "/data/${BASENAME}/${SLUG}/build.json" ] && sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/build.json || true #Allow absence of build.json [ -f "/data/${BASENAME}/${SLUG}/build.json" ] && sed -i "s/${CURRENT}/${LASTVERSION}/g" /data/${BASENAME}/${SLUG}/build.json || true #Allow absence of build.json
# Remove " and modify version # Remove " and modify version
LASTVERSION=${LASTVERSION//\"} LASTVERSION=${LASTVERSION//\"/}
CURRENT=${CURRENT//\"} CURRENT=${CURRENT//\"/}
jq --arg variable $LASTVERSION '.version = $variable' /data/${BASENAME}/${SLUG}/config.json | sponge /data/${BASENAME}/${SLUG}/config.json # Replace version tag jq --arg variable $LASTVERSION '.version = $variable' /data/${BASENAME}/${SLUG}/config.json | sponge /data/${BASENAME}/${SLUG}/config.json # Replace version tag
#Update changelog #Update changelog
@@ -151,7 +152,7 @@ for addons in $(bashio::config "addon|keys"); do
sed -i "1i " /data/${BASENAME}/${SLUG}/CHANGELOG.md sed -i "1i " /data/${BASENAME}/${SLUG}/CHANGELOG.md
LOGINFO="... $SLUG : files updated" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi LOGINFO="... $SLUG : files updated" && if [ $VERBOSE = true ]; then bashio::log.info $LOGINFO; fi
#Git commit and push #Git commit and push
git add -A # add all modified files git add -A # add all modified files
git commit -m "Update to ${LASTVERSION}" >/dev/null git commit -m "Update to ${LASTVERSION}" >/dev/null
@@ -169,4 +170,3 @@ for addons in $(bashio::config "addon|keys"); do
done done
bashio::log.info "Addons update completed" bashio::log.info "Addons update completed"

View File

@@ -1,28 +1,36 @@
## 1.0.0 (13-10-2021) ## 1.0.0 (13-10-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 0.9.9 (11-09-2021) ## 0.9.9 (11-09-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 0.9.8 (02-09-2021) ## 0.9.8 (02-09-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 0.9.7 (14-08-2021) ## 0.9.7 (14-08-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 0.9.6 (07-08-2021) ## 0.9.6 (07-08-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 2.6.2 (07-08-2021) ## 2.6.2 (07-08-2021)
- Update to latest version from alexbelgium/portainer - Update to latest version from alexbelgium/portainer
## 0.9.6 (21-07-2021) ## 0.9.6 (21-07-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
- Enable smb mounts - Enable smb mounts
## 0.9.5 (09-05-2021) ## 0.9.5 (09-05-2021)
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr
## 3.0.2.4552 ## 3.0.2.4552
- Update to latest version from linuxserver/docker-bazarr - Update to latest version from linuxserver/docker-bazarr

View File

@@ -10,17 +10,17 @@ RUN \
apt-get clean \ apt-get clean \
&& apt-get update \ && apt-get update \
&& apt-get install -y \ && apt-get install -y \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
|| apk add --no-cache \ || apk add --no-cache \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
\ \
################## ##################
# Install bashio # # Install bashio #

View File

@@ -1,15 +1,6 @@
{ {
"arch": [ "arch": ["aarch64", "amd64", "armv7", "armhf"],
"aarch64", "backup_exclude": ["**/Backups/*", "**/logs/*", "**/MediaCover/*"],
"amd64",
"armv7",
"armhf"
],
"backup_exclude": [
"**/Backups/*",
"**/logs/*",
"**/MediaCover/*"
],
"boot": "auto", "boot": "auto",
"description": "Companion application to Sonarr and Radarr to download subtitles", "description": "Companion application to Sonarr and Radarr to download subtitles",
"devices": [ "devices": [
@@ -32,12 +23,7 @@
"PUID": "0", "PUID": "0",
"PGID": "0" "PGID": "0"
}, },
"map": [ "map": ["config:rw", "share:rw", "media:rw", "ssl"],
"config:rw",
"share:rw",
"media:rw",
"ssl"
],
"name": "Bazarr NAS", "name": "Bazarr NAS",
"options": { "options": {
"PUID": 0, "PUID": 0,
@@ -49,10 +35,7 @@
"ports_description": { "ports_description": {
"6767/tcp": "web interface" "6767/tcp": "web interface"
}, },
"privileged": [ "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
"SYS_ADMIN",
"DAC_READ_SEARCH"
],
"schema": { "schema": {
"PUID": "int", "PUID": "int",
"PGID": "int", "PGID": "int",

View File

@@ -12,11 +12,11 @@ RUN \
apt-get clean \ apt-get clean \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
keyutils \ keyutils \
samba \ samba \
\ \
################### ###################
# Install bashio # # Install bashio #

View File

@@ -1,14 +1,13 @@
#!/bin/bash #!/bin/bash
if [ ! -f "/usr/bin/bashio" ]; then
if [ ! -f "/usr/lib/bashio" ]; then
echo "Bashio does not exist, executing script" echo "Bashio does not exist, executing script"
################ ################
# Install apps # # Install apps #
################ ################
apt-get clean apt-get clean
apt-get update \ apt-get update
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
jq \ jq \
curl \ curl \
cifs-utils \ cifs-utils \
@@ -20,10 +19,10 @@ if [ ! -f "/usr/lib/bashio" ]; then
################## ##################
mkdir -p /tmp/bashio mkdir -p /tmp/bashio
curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" |
tar -xzf - --strip 1 -C /tmp/bashio \ tar -xzf - --strip 1 -C /tmp/bashio
mv /tmp/bashio/lib /usr/lib/bashio \ mv /tmp/bashio/lib /usr/lib/bashio
ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ ln -s /usr/lib/bashio/bashio /usr/bin/bashio
rm -rf /tmp/bashio rm -rf /tmp/bashio
echo "Bashio installed" echo "Bashio installed"
fi fi