blakeblackshear.frigate/Makefile

38 lines
1.2 KiB
Makefile
Raw Normal View History

default_target: local
2020-10-07 23:25:54 +02:00
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
2022-10-09 02:32:45 +02:00
VERSION = 0.12.0
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
2020-12-19 13:51:10 +01:00
version:
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
local: version
docker buildx build --tag frigate:latest --load .
2021-05-18 07:52:08 +02:00
build_web:
docker buildx build --target web-dist --output web/dist .
2020-10-07 23:25:54 +02:00
amd64:
docker buildx build --platform linux/amd64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
arm64:
docker buildx build --platform linux/arm64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
armv7:
docker buildx build --platform linux/arm/v7 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
build: version amd64 arm64 armv7
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) .
push: build
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) .
2021-01-09 18:26:46 +01:00
2022-04-12 15:30:55 +02:00
run_tests: frigate
docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate
2022-03-11 05:33:53 +01:00
.PHONY: run_tests