a0983157a0
Build-orchestration for the jellyfin-ha Jellyfin fork: pins an upstream
commit (UPSTREAM_REF), publishes the .NET 10 server, and builds/pushes the
runtime image to git.unkin.net/unkin/jellyfin-ha on v* tags.
- UPSTREAM_REF pinned to d4f9c12
- Dockerfile.runtime (vendored runtime-only image + jellyfin-web 10.11.6)
- .woodpecker/{build,docker}.yaml (publish + docker-buildx, k8s resources)
- Makefile (publish/build + patch/minor/major release tagging)
40 lines
1.4 KiB
Makefile
40 lines
1.4 KiB
Makefile
.PHONY: publish build clean patch minor major
|
|
|
|
IMAGE ?= git.unkin.net/unkin/jellyfin-ha
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev")
|
|
REF := $(shell cat UPSTREAM_REF)
|
|
|
|
# Clone the pinned upstream source and publish the .NET server into
|
|
# ./publish-output (consumed by Dockerfile.runtime). Mirrors CI.
|
|
publish:
|
|
rm -rf src publish-output
|
|
git clone https://github.com/ZoltyMat/jellyfin-ha.git src
|
|
git -C src checkout $(REF)
|
|
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
|
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
|
|
|
build: publish
|
|
docker build -f Dockerfile.runtime -t $(IMAGE):$(VERSION) .
|
|
|
|
clean:
|
|
rm -rf src publish-output
|
|
docker rmi $(IMAGE):$(VERSION) 2>/dev/null || true
|
|
|
|
_LATEST := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)
|
|
_BASE := $(if $(_LATEST),$(_LATEST),v0.0.0)
|
|
_MAJ := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f1)
|
|
_MIN := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f2)
|
|
_PAT := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3)
|
|
|
|
patch:
|
|
@NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
minor:
|
|
@NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
major:
|
|
@NEW=v$(shell expr $(_MAJ) + 1).0.0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|