forked from many-things/cw-hyperlane
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (28 loc) · 838 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
PWD:=$(shell pwd)
BASE:=$(shell basename "$(PWD)")
clean:
@cargo clean
@rm -rf ./artifacts
install: install-dev
install-dev: install-prod
cargo install --force cw-optimizoor beaker
install-prod:
cargo install --force cosmwasm-check
rustup target add wasm32-unknown-unknown
schema:
ls ./contracts | xargs -n 1 -t beaker wasm ts-gen
check:
ls -d ./artifacts/*.wasm | xargs -I x cosmwasm-check x
optimize:
docker run --rm -v "$(PWD)":/code \
--mount type=volume,source="$(BASE)_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/optimizer:0.15.0
optimize-fast:
cargo cw-optimizoor
rename --force 's/(.*)-(.*)\.wasm/$$1\.wasm/d' artifacts/*
build: optimize-fast check
cargo build
cargo wasm
ci-build: optimize check
zip -jr wasm_codes.zip artifacts