diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..49f5f1c --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +IMAGE_TYPE ?= lxd +BUILD_DIR = ./build + +.PHONY: json +json: + @jsonnet --ext-str type="$(IMAGE_TYPE)" -o $(BUILD_DIR)/image.pkr.json main.jsonnet + +.PHONY: build +build: validate + @packer build $(BUILD_DIR) + +.PHONY: validate +validate: json + @packer validate $(BUILD_DIR) + +.PHONY: clean +clean: + @find ./build -type f -not -iname .gitkeep | xargs rm -f