Skip to content

Commit

Permalink
Use podman, fall back to docker if unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
craftyguy committed Oct 24, 2022
1 parent a24577f commit 6ce32f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
DOCKER := $(shell { command -v podman || command -v docker; })

.PHONY: clean setup

Expand All @@ -10,11 +11,11 @@ clean:
rm ./firmware/*.uf2

firmware/%-left.uf2 firmware/%-right.uf2: config/adv360.keymap
docker run --rm -it --name zmk \
$(DOCKER) run --rm -it --name zmk \
-v $(PWD)/firmware:/app/firmware \
-v $(PWD)/config:/app/config:ro \
-e TIMESTAMP=$(TIMESTAMP) \
zmk

setup: Dockerfile bin/build.sh config/west.yml
docker build --tag zmk --file Dockerfile .
$(DOCKER) build --tag zmk --file Dockerfile .

0 comments on commit 6ce32f0

Please sign in to comment.