diff --git a/.gitignore b/.gitignore index 5b7849e..5634e5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .cartesi .cartesi.env +.imageid node_modules frontend/node_modules/** frontend/.next/** diff --git a/Makefile b/Makefile index 35ad9e8..e5488b4 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,22 @@ +MACHINE_IMAGE=.cartesi/image.ext2 +IIDFILE=.imageid + .PHONY: all -all: bounties test-image +all: bounties $(MACHINE_IMAGE) .PHONY: bounties bounties: $(MAKE) -C tests/bounties +.PHONY: machine +machine: $(MACHINE_IMAGE) + +$(MACHINE_IMAGE): $(IIDFILE) + pnpm exec cartesi build --from-image "$(shell cat $<)" + +$(IIDFILE): Dockerfile .dockerignore go.mod go.sum $(shell find shared contract bwrapbox skel) + docker build --iidfile $@ --platform linux/riscv64 . + .PHONY: clean clean: $(MAKE) -C tests/bounties clean diff --git a/README.md b/README.md index f390f64..56e7631 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ pnpm i #### From source ```sh -pnpm build +make build ``` #### From a tagged image diff --git a/package.json b/package.json index fbf6759..b736083 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "0.0.0", "private": true, "scripts": { - "build": "cartesi build", "start": "cartesi run --disable-bundler --disable-paymaster" }, "devDependencies": {