Compare commits

...

2 Commits

Author SHA1 Message Date
7ba16f7132 fix drone
All checks were successful
continuous-integration/drone/tag Build is passing
2021-09-28 11:48:38 +02:00
51bbeb82c1 fix backup removal
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-28 11:46:54 +02:00
3 changed files with 5 additions and 4 deletions

View File

@@ -12,11 +12,12 @@ steps:
repo: docker.asperti.com/paspo/hassio-auto-backup
tags:
- latest
- 0.1.2
- ${DRONE_TAG}
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
force_tag: true
username:
from_secret: docker_username
trigger:
event:
- tag
- push

View File

@@ -43,5 +43,5 @@ FIRST_SLUG_TO_DELETE=$(echo "1 + $NUM_BACKUPS" | bc)
echo $CURRENT_BACKUPS | jq --raw-output ".data.backups | sort_by(.date) | reverse[] | select(.slug != \"$SLUG\") | select (.protected==false) | .slug " | tail -n +$FIRST_SLUG_TO_DELETE | while read SLUG_TO_DELETE
do
echo "Removing backup $SLUG_TO_DELETE"
curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X POST http://hassio/backups/$SLUG_TO_DELETE/remove
curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X DELETE http://hassio/backups/$SLUG_TO_DELETE
done

View File

@@ -1,7 +1,7 @@
{
"name": "Auto Backup",
"url": "https://git.asperti.com/paspo/hassio-addons",
"version": "0.2.0",
"version": "0.2.1",
"slug": "auto-backup",
"description": "Take hassio backups with fixed timings and manage retention",
"startup": "application",