Commit e4b8b702 authored by norswap's avatar norswap Committed by GitHub

makefile improvements (#2772)

* Add `make nuke` which removes ALL build output/caches/etc
  (everything that is `.gitignore`d).

* Add `-v` flag to `xargs` in `make devnet-clean` so that it doesn't error when
  there are no volumes or images to delete.

* If `nvm` is installed, emit `nvm use` before compiling js.

* Add `yarn install` to `build-ts`.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ceb07258
...@@ -8,6 +8,10 @@ build-go: submodules op-node op-proposer op-batcher ...@@ -8,6 +8,10 @@ build-go: submodules op-node op-proposer op-batcher
.PHONY: build-go .PHONY: build-go
build-ts: submodules build-ts: submodules
if [ -n "$$NVM_DIR" ]; then \
. $$NVM_DIR/nvm.sh && nvm use; \
fi
yarn install
yarn build yarn build
.PHONY: build-ts .PHONY: build-ts
...@@ -47,6 +51,10 @@ clean: ...@@ -47,6 +51,10 @@ clean:
rm -rf ./bin rm -rf ./bin
.PHONY: clean .PHONY: clean
nuke: clean devnet-clean
git clean -Xdf
.PHONY: nuke
devnet-up: devnet-up:
@bash ./ops-bedrock/devnet-up.sh @bash ./ops-bedrock/devnet-up.sh
.PHONY: devnet-up .PHONY: devnet-up
...@@ -59,9 +67,8 @@ devnet-clean: ...@@ -59,9 +67,8 @@ devnet-clean:
rm -rf ./packages/contracts-bedrock/deployments/devnetL1 rm -rf ./packages/contracts-bedrock/deployments/devnetL1
rm -rf ./.devnet rm -rf ./.devnet
cd ./ops-bedrock && docker-compose down cd ./ops-bedrock && docker-compose down
docker image ls 'ops-bedrock*' --format='{{.Repository}}' | xargs docker rmi docker image ls 'ops-bedrock*' --format='{{.Repository}}' | xargs -r docker rmi
docker volume ls --filter name=ops-bedrock --format='{{.Name}}' | xargs docker volume rm docker volume ls --filter name=ops-bedrock --format='{{.Name}}' | xargs -r docker volume rm
.PHONY: devnet-clean .PHONY: devnet-clean
test-unit: test-unit:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment