mirror of
https://github.com/luzifer-docker/radicale.git
synced 2024-11-09 19:10:04 +00:00
Add automated updates
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6779c82438
commit
29539cc5ae
2 changed files with 38 additions and 0 deletions
7
.travis.yml
Normal file
7
.travis.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
script:
|
||||
- bash update-version.sh
|
31
update-version.sh
Executable file
31
update-version.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Switch back to master"
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
|
||||
### ---- ###
|
||||
|
||||
echo "Fetching latest version..."
|
||||
LATEST=$(curl -sSLf 'https://lv.luzifer.io/catalog-api/radicale/latest.txt?p=version')
|
||||
|
||||
echo "Found version ${LATEST}, patching..."
|
||||
sed -i "s/RADICALE_VERSION=.*$/RADICALE_VERSION=${LATEST}/" Dockerfile
|
||||
|
||||
echo "Checking for changes..."
|
||||
git diff --exit-code && exit 0
|
||||
|
||||
echo "Testing build..."
|
||||
docker build .
|
||||
|
||||
echo "Updating repository..."
|
||||
git add Dockerfile
|
||||
git -c user.name='Travis Automated Update' -c user.email='travis@luzifer.io' \
|
||||
commit -m "Radicale ${LATEST}"
|
||||
git tag ${LATEST}
|
||||
|
||||
git push -q https://${GH_USER}:${GH_TOKEN}@github.com/luzifer-docker/radicale.git master --tags
|
Loading…
Reference in a new issue