-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 978 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
REPO = ghcr.io/mopidy
IMAGE = gst-plugins-rs-build
VERSION = $(shell cat VERSION)
WORKDIR = /src
PLUGIN = audio/spotify
ifdef GST_PLUGINS_RS_SRC
GST_PLUGINS_RS_MOUNT := "-v ${GST_PLUGINS_RS_SRC}:${WORKDIR}/gst-plugins-rs:z"
endif
.PHONY: build release git-release docker-release
build: docker-build build-armhf build-arm64 build-x86_64
build-%:
docker run ${GST_PLUGINS_RS_MOUNT} -v .:${WORKDIR}:z --workdir ${WORKDIR} -e GST_GIT_REPO -e GST_GIT_BRANCH ${REPO}/${IMAGE}:${VERSION} /bin/bash entrypoint.sh $* ${PLUGIN}
docker-build:
docker build --tag ${REPO}/${IMAGE}:${VERSION} --file Dockerfile .
release: git-release docker-release
git-release:
git diff-index --quiet HEAD || (echo "Git repo is unclean"; false)
git tag -a "${IMAGE}/${VERSION}" -m "Release ${IMAGE}:${VERSION}"
git push --follow-tags
docker-release:
docker tag ${REPO}/${IMAGE}:${VERSION} ${REPO}/${IMAGE}:latest
docker push ${REPO}/${IMAGE}:${VERSION}
docker push ${REPO}/${IMAGE}:latest