From c0d7a7e80adacf7fb360fe4bdc4d21db26472a91 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 2 Nov 2022 22:07:38 +0100 Subject: [PATCH] Add ffmigrate tool to run.sh --- Dockerfile | 8 +++++--- run.sh | 9 +++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 50378cb0..98286bfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,17 +7,19 @@ FROM $GOLANG_IMAGE as builder COPY . /dist/core RUN apk add \ - git \ - make && \ + git \ + make && \ cd /dist/core && \ go version && \ make release_linux && \ - make import_linux + make import_linux && \ + make ffmigrate_linux FROM $BUILD_IMAGE COPY --from=builder /dist/core/core /core/bin/core COPY --from=builder /dist/core/import /core/bin/import +COPY --from=builder /dist/core/ffmigrate /core/bin/ffmigrate COPY --from=builder /dist/core/mime.types /core/mime.types COPY --from=builder /dist/core/run.sh /core/bin/run.sh diff --git a/run.sh b/run.sh index 1521c30f..9dce22ee 100755 --- a/run.sh +++ b/run.sh @@ -8,6 +8,15 @@ if [ $? -ne 0 ]; then exit 1 fi +# Run the FFmpeg migration program. In case a FFmpeg 5 binary is present, it will create a +# backup of the current DB and modify the FFmpeg parameter such that they are compatible +# with FFmpeg 5. + +./bin/ffmigrate +if [ $? -ne 0 ]; then + exit 1 +fi + # Now run the core with the possibly converted configuration. ./bin/core