-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
74 lines (64 loc) · 1.81 KB
/
Makefile.toml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[config]
# Set this to `false` to run the tasks at workspace root directory and not on the members
default_to_workspace = false
# Set this to `true` to avoid clashes with core commands (e.g. `cargo make publish` vs `cargo publish`)
skip_core_tasks = true
[tasks.fmt]
toolchain = "nightly"
command = "cargo"
args = ["fmt", "--all"]
[tasks.test]
script = """
for contract in contracts/*; do
cargo test --manifest-path $contract/Cargo.toml
done
"""
# This task requires substrate-contract-node
[tasks.test-e2e]
script = """
for contract in contracts/*; do
cargo test --manifest-path $contract/Cargo.toml --features e2e-tests
done
"""
[tasks.lint]
command = "cargo"
args = ["clippy", "--tests", "--", "-D", "warnings"]
# This task requires the `cargo-contract` package: https://crates.io/crates/cargo-contract
[tasks.release]
script = """
for contract in contracts/*; do
cargo contract build --release --manifest-path $contract/Cargo.toml
done
"""
# This task requires the `cargo-contract` package: https://crates.io/crates/cargo-contract
[tasks.debug]
script = """
for contract in contracts/*; do
cargo contract build --manifest-path $contract/Cargo.toml
done
"""
# This task requires the `cargo-udeps` package: https://crates.io/crates/cargo-udeps
[tasks.udeps]
toolchain = "nightly"
command = "cargo"
args = ["udeps"]
# This task requires the `cargo-contract` package: https://crates.io/crates/cargo-contract
[tasks.check]
script = """
for contract in contracts/*; do
cargo contract check --manifest-path $contract/Cargo.toml
done
"""
# Update the `crates` array in the script to reflect the content of your project
[tasks.publish]
script = """
crates=(
contract-name
project-name
)
for crate in ${crates[@]}; do
cargo publish -p $crate
echo "💤 sleeping for 30 sec before publishing the next crate..."
sleep 30
done
"""