-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.toml
63 lines (54 loc) · 1.87 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
[config]
default_to_workspace = false
additional_profiles = [
"all-default-tasks",
"docs-all-modification-tasks",
"ci-coverage-tasks",
"ci-all-build-tasks",
"ci-static-code-analysis-tasks",
"publish-pre-cleanup",
]
[env]
#CARGO_MAKE_COVERAGE_PROVIDER = "tarpaulin"
# CARGO_MAKE_TEST_COVERAGE_DEFAULT_BINARY_FILTER = "snmp_sim_api_tests-[a-z0-9]*$"
# CARGO_MAKE_TEST_COVERAGE_BINARY_FILTER = "${CARGO_MAKE_TEST_COVERAGE_DEFAULT_BINARY_FILTER}"
[tasks.audit]
ignore_errors = true
[tasks.install-openapi]
condition = { files_not_exist = ["~/.local/bin/openapi-generator"] }
script = '''
sudo apt update && sudo apt install -y python3 python3-pip protobuf-compiler openjdk-11-jre-headless curl maven jq
pip3 install yq
mkdir -p ~/.local/bin/
curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/.local/bin/openapi-generator
chmod u+x ~/.local/bin/openapi-generator
'''
[tasks.format]
description = "Runs the cargo rustfmt plugin."
toolchain = "nightly"
command = "cargo"
args = ["fmt", "--all", "--check"]
[tasks.lint]
description = "Runs the cargo clippy plugin."
script = '''
#!/usr/bin/env bash -eux
cargo clippy --workspace --all-targets --all-features -- -D clippy::all
'''
[tasks.coverage]
# clear = true
# command = "cargo"
# args = ["tarpaulin", "--ignore-tests", "--follow-exec", "--forward", "--workspace", "--exclude", "snmp-sim-cli", "--exclude-files", "clients/rust*", "--out", "Xml"]
[tasks.rust-client]
command = "make"
args = ["rust-client"]
[tasks.db-entity]
description = "Generates DB entity model and stores in location"
script = '''
sea-orm-cli generate entity -o ./src/data_access/entity
sed -i 's/DateTime/DateTimeUtc/g' ./src/data_access/entity/*.rs
'''
[tasks.db-entity.mac]
script = '''
sea-orm-cli generate entity -o ./src/data_access/entity
gsed -i 's/DateTime/DateTimeUtc/g' ./src/data_access/entity/*.rs
'''