File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11DIRS += $(shell find */* -maxdepth 0 -name Makefile -exec dirname "{}" \;)
22
33.PHONY: build
4- build:
4+ build: check-go-mod
55 DOCKER_BUILDKIT=1 \
66 docker build \
7+ --pull \
8+ --no-cache \
79 --rm=true \
810 --platform=linux/amd64 \
911 --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) \
1012 --build-arg BRANCH=$(BRANCH) \
11- --build-arg BUILD_GIT_VERSION=$$(git describe --tags --always --dirty) \
1213 --build-arg BUILD_GIT_COMMIT=$$(git rev-parse --short HEAD) \
1314 --build-arg BUILD_DATE=$$(date -u +%Y-%m-%dT%H:%M:%SZ) \
1415 -t $(DOCKER_REGISTRY)/$(SERVICE):$(BRANCH) \
1516 -f Dockerfile .
1617
18+ .PHONY: check-go-mod
19+ check-go-mod:
20+ @if [ -f "go.mod" ]; then \
21+ echo "go.mod found, running go mod vendor..."; \
22+ go mod vendor; \
23+ else \
24+ echo "go.mod not found, skipping go mod vendor."; \
25+ fi
26+
1727.PHONY: upload
1828upload:
1929 docker push $(DOCKER_REGISTRY)/$(SERVICE):$(BRANCH)
2030
2131.PHONY: clean
2232clean:
2333 docker rmi $(DOCKER_REGISTRY)/$(SERVICE):$(BRANCH) || true
24- docker builder prune --max-used-space 21474836480 -f || true
34+ docker image prune -f || true
35+ docker builder prune --all -f || true
36+ rm -rf vendor
2537
2638.PHONY: apply
2739apply:
Original file line number Diff line number Diff line change 1- include ../../../ Makefile.folder
1+ include ../Makefile.folder
Original file line number Diff line number Diff line change 1- include ../../../../ Makefile.variables
2- include ../../../../ common.env
1+ include ../../Makefile.variables
2+ include ../../common.env
33
44TASK_FILE ?= dummy-task.md
55BRANCH := dev
@@ -8,6 +8,12 @@ AGENT_DIR ?= $(shell cd ../.. && pwd)/agent
88MODEL ?= sonnet
99ALLOWED_TOOLS ?= Grep,Read
1010
11+ # No-op so the recursive `apply` sweep from the parent Makefile.docker doesn't
12+ # choke on this directory.
13+ .PHONY : apply
14+ apply :
15+ @echo " skip apply for cmd/run-task (local CLI, not deployed)"
16+
1117generate-dummy-task :
1218 @echo ' ---' > $(TASK_FILE )
1319 @echo ' status: in_progress' >> $(TASK_FILE )
You can’t perform that action at this time.
0 commit comments