Files
frigate/Makefile
T

43 lines
1.6 KiB
Makefile
Raw Normal View History

2022-04-24 13:52:12 -05:00
default_target: local
2020-10-07 16:25:54 -05:00
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
2024-08-06 06:40:20 -06:00
VERSION = 0.14.1
2022-11-23 20:00:45 -06:00
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
2022-04-24 13:52:12 -05:00
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
BOARDS= #Initialized empty
include docker/*/*.mk
build-boards: $(BOARDS:%=build-%)
push-boards: $(BOARDS:%=push-%)
2020-12-19 06:51:10 -06:00
version:
2022-11-20 10:34:12 -03:00
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
local: version
docker buildx build --target=frigate --tag frigate:latest --load --file docker/main/Dockerfile .
2022-04-24 13:52:12 -05:00
amd64:
docker buildx build --platform linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
2022-04-24 13:52:12 -05:00
arm64:
docker buildx build --platform linux/arm64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
2022-04-24 13:52:12 -05:00
2023-04-08 10:24:28 -05:00
build: version amd64 arm64
docker buildx build --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
2022-04-24 13:52:12 -05:00
push: push-boards
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) --file docker/main/Dockerfile .
2021-01-09 09:26:46 -08:00
2022-12-07 10:47:40 -03:00
run: local
docker run --rm --publish=5000:5000 --volume=${PWD}/config:/config frigate:latest
2022-12-07 10:47:40 -03:00
2022-11-30 19:53:45 -03:00
run_tests: local
2022-12-07 10:47:40 -03:00
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m unittest
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m mypy --config-file frigate/mypy.ini frigate
2022-03-10 22:33:53 -06:00
.PHONY: run_tests