Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-29 13:53:32 +02:00
parent bfbe45f02f
commit 67ea719294

View File

@ -54,17 +54,19 @@ $(PWN_RELEASE).img: | $(PACKER)
$(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json builder/pwnagotchi.yml $(shell find builder/data -type f) $(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json builder/pwnagotchi.yml $(shell find builder/data -type f)
sudo $(PACKER) plugins install github.com/solo-io/arm-image sudo $(PACKER) plugins install github.com/solo-io/arm-image
cd builder && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json cd builder && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json
sudo chown -R $$USER:$$USER ../../../
mv builder/images/* ../../../
# If any of these files are updated, rebuild the checksums. # If any of these files are updated, rebuild the checksums.
pwnagotchi-$(PWN_VERSION)-arm64sha256: ../../pwnagotchi-$(PWN_VERSION)-arm64.img $(PWN_RELEASE).sha256: $(PWN_RELEASE).img
sha256sum $^ > $@ sha256sum $^ > $@
# If any of the input files are updated, rebuild the archive. # If any of the input files are updated, rebuild the archive.
pwnagotchi-$(PWN_VERSION)-arm64.zip: ../../pwnagotchi-$(PWN_VERSION)-arm64.img pwnagotchi-$(PWN_VERSION)-arm64.sha256 $(PWN_RELEASE).zip: $(PWN_RELEASE).img $(PWN_RELEASE).sha256
zip pwnagotchi-$(PWN_VERSION)-arm64.zip $^ zip $(PWN_RELEASE).zip $^
.PHONY: image .PHONY: image
image: pwnagotchi-$(PWN_VERSION)-arm64.zip image: $(PWN_RELEASE).zip
clean: clean:
- python3 setup.py clean --all - python3 setup.py clean --all