mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 05:24:11 +03:00
Some checks failed
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
* chore: i18n use cache key * Fix indentation in Dockerfile for pip command * Add build argument for GIT_COMMIT_HASH in CI workflow * Add short-sha output to action.yml * Update build args to use short SHA output * build: use vite .env * Remove unnecessary newline in Dockerfile * Define proxy host variable in vite.config.ts Add a new line to define the proxy host variable.
61 lines
1.8 KiB
Makefile
61 lines
1.8 KiB
Makefile
default_target: local
|
|
|
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
|
VERSION = 0.17.0
|
|
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
|
|
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
|
BOARDS= #Initialized empty
|
|
|
|
include docker/*/*.mk
|
|
|
|
build-boards: $(BOARDS:%=build-%)
|
|
|
|
push-boards: $(BOARDS:%=push-%)
|
|
|
|
version:
|
|
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
|
|
echo 'VITE_GIT_COMMIT_HASH=$(COMMIT_HASH)' > web/.env
|
|
|
|
local: version
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--tag frigate:latest \
|
|
--load
|
|
|
|
debug: version
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--build-arg DEBUG=true \
|
|
--tag frigate:latest \
|
|
--load
|
|
|
|
amd64:
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
--platform linux/amd64
|
|
|
|
arm64:
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
--platform linux/arm64
|
|
|
|
build: version amd64 arm64
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
--platform linux/arm64/v8,linux/amd64
|
|
|
|
push: push-boards
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
--tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) \
|
|
--platform linux/arm64/v8,linux/amd64 \
|
|
--push
|
|
|
|
run: local
|
|
docker run --rm --publish=5000:5000 --volume=${PWD}/config:/config frigate:latest
|
|
|
|
run_tests: local
|
|
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
|
|
|
|
.PHONY: run_tests
|