From 615276498719f3a29e7562fb3e868836cf9cd643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deluan=20Quint=C3=A3o?= Date: Mon, 30 Jun 2025 11:40:20 -0400 Subject: [PATCH] chore(deps): update TagLib to 2.1.1 (#4281) * chore: update CROSS_TAGLIB_VERSION to 2.1.1-1 * feat: add run-docker target Introduced a new Makefile target `run-docker` that allows users to run a Navidrome Docker image with specified tags. This addition simplifies the process of launching the Docker container by handling volume mappings for configuration and music folders. The change enhances the development workflow by making it easier to test and run PR images Signed-off-by: Deluan --------- Signed-off-by: Deluan --- .github/workflows/pipeline.yml | 2 +- Dockerfile | 2 +- Makefile | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 9ee7546fd..8938c0803 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -14,7 +14,7 @@ concurrency: cancel-in-progress: true env: - CROSS_TAGLIB_VERSION: "2.1.0-1" + CROSS_TAGLIB_VERSION: "2.1.1-1" IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') && 'true' || 'false' }} jobs: diff --git a/Dockerfile b/Dockerfile index 2606d2153..3600ff6d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ COPY --from=xx-build /out/ /usr/bin/ ### Get TagLib FROM --platform=$BUILDPLATFORM public.ecr.aws/docker/library/alpine:3.19 AS taglib-build ARG TARGETPLATFORM -ARG CROSS_TAGLIB_VERSION=2.1.0-1 +ARG CROSS_TAGLIB_VERSION=2.1.1-1 ENV CROSS_TAGLIB_RELEASES_URL=https://github.com/navidrome/cross-taglib/releases/download/v${CROSS_TAGLIB_VERSION}/ RUN < + @if [ -z "$(tag)" ]; then echo "Usage: make run-docker tag="; exit 1; fi + @TAG_DIR="tmp/$$(echo '$(tag)' | tr '/:' '_')"; mkdir -p "$$TAG_DIR"; \ + VOLUMES="-v $(PWD)/$$TAG_DIR:/data"; \ + if [ -f navidrome.toml ]; then \ + VOLUMES="$$VOLUMES -v $(PWD)/navidrome.toml:/data/navidrome.toml:ro"; \ + MUSIC_FOLDER=$$(grep '^MusicFolder' navidrome.toml | head -n1 | sed 's/.*= *"//' | sed 's/".*//'); \ + if [ -n "$$MUSIC_FOLDER" ] && [ -d "$$MUSIC_FOLDER" ]; then \ + VOLUMES="$$VOLUMES -v $$MUSIC_FOLDER:/music:ro"; \ + fi; \ + fi; \ + echo "Running: docker run --rm -p 4533:4533 $$VOLUMES $(tag)"; docker run --rm -p 4533:4533 $$VOLUMES $(tag) +.PHONY: run-docker + package: docker-build ##@Cross_Compilation Create binaries and packages for ALL supported platforms @if [ -z `which goreleaser` ]; then echo "Please install goreleaser first: https://goreleaser.com/install/"; exit 1; fi goreleaser release -f release/goreleaser.yml --clean --skip=publish --snapshot