mirror of
https://github.com/spritsail/plex-media-server.git
synced 2024-12-20 11:34:36 +00:00
Add update.sh convenience script
Makes updating to the latest Plex build a ton easier. The script pulls the latest build information, updates the Dockerfile, commits and pushes all automagically. [CI SKIP] Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
parent
38184e71fb
commit
482779329d
23
update.sh
Executable file
23
update.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
RELEASE="$(curl -fsSL https://api.spritsail.io/plex/release | jq -c)"
|
||||
VERSION="$(jq -r .version <<< "$RELEASE")"
|
||||
CHECKSUM="$(jq -r '.["csum-deb"]' <<< "$RELEASE")"
|
||||
|
||||
sed -Ei \
|
||||
-e "s/^(ARG PLEX_VER=).*$/\1$VERSION/" \
|
||||
-e "s/^(ARG PLEX_SHA=).*$/\1$CHECKSUM/" \
|
||||
Dockerfile
|
||||
|
||||
if ! git diff --quiet --exit-code Dockerfile; then
|
||||
git reset --soft
|
||||
git add -- Dockerfile
|
||||
git commit \
|
||||
--author="Spritsail Bot <bot@spritsail.io>" \
|
||||
--no-gpg-sign \
|
||||
-m "Update to Plex ${VERSION%-*}"
|
||||
git push origin HEAD
|
||||
else
|
||||
>&2 echo No update available
|
||||
fi
|
Loading…
Reference in New Issue
Block a user