Skip to content

Commit c1e94c6

Browse files
committed
Update Makefile.toml
1 parent c96faa6 commit c1e94c6

File tree

3 files changed

+54
-36
lines changed

3 files changed

+54
-36
lines changed

.cargo/Makefile.toml

Lines changed: 0 additions & 27 deletions
This file was deleted.

Cargo.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ cargo-fmt = [
3838
"structopt",
3939
]
4040

41-
rustfmt-format-diff = [
42-
"env_logger",
43-
"serde",
44-
"serde_json",
45-
"structopt",
46-
]
47-
4841
config = [
4942
"dirs",
5043
"rustfmt-config_proc_macro",
@@ -61,7 +54,20 @@ emitter = [
6154
"term",
6255
]
6356

57+
git-rustfmt = [
58+
"env_logger",
59+
"structopt",
60+
]
61+
6462
rustfmt = [
63+
"env_logger",
64+
"structopt",
65+
]
66+
67+
rustfmt-format-diff = [
68+
"env_logger",
69+
"serde",
70+
"serde_json",
6571
"structopt",
6672
]
6773

Makefile.toml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
extend = ".cargo/Makefile.toml"
1+
[env]
2+
CFG_RELEASE = { value = "${CARGO_MAKE_RUST_VERSION}", condition = { env_not_set = ["CFG_RELEASE"] } }
3+
CFG_RELEASE_CHANNEL = { value = "${CARGO_MAKE_RUST_CHANNEL}", condition = { env_not_set = ["CFG_RELEASE_CHANNEL"] } }
4+
5+
[tasks.build-bin]
6+
command = "cargo"
7+
args = [
8+
"build",
9+
"--bin",
10+
"rustfmt",
11+
"--bin",
12+
"cargo-fmt",
13+
"--features=rustfmt,cargo-fmt",
14+
]
15+
16+
[tasks.build-bins]
17+
command = "cargo"
18+
args = [
19+
"build",
20+
"--all-features",
21+
"--bins",
22+
]
223

324
[tasks.install]
425
command = "cargo"
@@ -7,7 +28,8 @@ args = [
728
"--path",
829
".",
930
"--force",
10-
"--locked",
31+
"--locked", # Respect Cargo.lock
32+
"--features=rustfmt,cargo-fmt" # Install only rustfmt and cargo-fmt
1133
]
1234

1335
[tasks.test-all]
@@ -17,6 +39,23 @@ run_task = { name = ["test", "test-ignored"] }
1739
command = "cargo"
1840
args = [
1941
"test",
42+
"--all-features",
2043
"--",
2144
"--ignored",
2245
]
46+
47+
[tasks.b]
48+
alias = "build"
49+
50+
[tasks.bb]
51+
alias = "build-bin"
52+
53+
[tasks.bins]
54+
alias = "build-bins"
55+
56+
[tasks.c]
57+
alias = "check"
58+
59+
[tasks.t]
60+
alias = "test"
61+

0 commit comments

Comments
 (0)