-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.toml
210 lines (190 loc) · 5.51 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# rust_wasm_websocket/Makefile.toml
#https://github.com/sagiegurari/cargo-makefile
[config]
skip_core_tasks = true
[tasks.default]
description = "help for prepared make tasks"
clear = true
script= [
"clear",
"printf ",
"printf COMMANDS AND MAKE TASKS:",
"printf ",
"printf $ clear - clear the screen",
"printf $ cargo make - this list",
"printf ",
"printf $ cargo make check - check code errors without compiling",
"printf $ cargo make increment_minor - if needed increment semver minor",
"printf $ cargo make release - build release version, increment semver patch in Cargo.toml",
"printf ",
"printf $ cargo make test - test the test code",
"printf $ cargo make udeps - cargo +nightly udeps - unused dependencies",
"printf $ cargo crev verify - always verify you dependencies",
"printf $ cargo make audit - RustSec advisories",
"printf $ cargo make doc - includes from Cargo.toml to README.md and from README.md to main.rs or lib.rs, generates doc and copies to docs folder, exports codetour to .md.",
"printf ",
"printf $ cargo make commit commit_message - git commit ",
"printf $ cargo make amend - amend to last commit ",
"printf $ cargo make git_push - git push",
"printf ",
"printf $ cargo make crates_io_dry_run - prepare publishing for crates.io",
"printf $ cargo make crates_io_publish - git tag and publish to crates.io",
"printf ",
]
# end of help
# end of help
# end of help
[tasks.check]
description = "cargo check --release"
clear = true
script = [
"clear",
"printf $ cargo fmt",
"cargo fmt",
"printf $ cargo check --release",
"cargo check --release",
]
# end of dev scripts
# end of dev scripts
# end of dev scripts
[tasks.increment_minor]
description = "increments semver minor"
clear = true
script = [
"clear",
"lmake_semver --increment=minor",
]
[tasks.release]
description = "cargo build release"
clear = true
script = [
"clear",
# Library version is semver
"printf $ lmake_semver --increment=patch",
"lmake_semver --increment=patch",
"printf $ cargo fmt",
"cargo fmt",
"printf $ cargo build --release",
"cargo build --release",
]
# end of release scripts
# end of release scripts
# end of release scripts
[tasks.test]
description = "cargo test"
clear = true
script = [
"clear",
"printf $ cargo test",
"cargo test",
]
[tasks.udeps]
description = "lists unused dependencies needs nightly"
clear = true
script = [
"cargo +nightly udeps",
]
[tasks.verify]
description = "cargo crev verify - "
clear = true
script = [
"clear",
"cargo crev verify"
]
[tasks.audit]
description = "cargo audit - RustSec advisories"
clear = true
script = [
"clear",
"cargo audit"
]
[tasks.doc]
description = "cargo doc - create docs from doc comments"
clear = true
script= [
"clear",
"printf $ lmake_lines_of_code",
"lmake_lines_of_code",
"printf $ lmake_cargo_toml_to_md",
"lmake_cargo_toml_to_md",
"printf $ lmake_md_to_doc_comments",
"lmake_md_to_doc_comments",
"printf $ cargo doc --no-deps --document-private-items",
# create doc from doc comments
"cargo doc --no-deps --document-private-items",
"printf $ codetour_export_to_md",
# export code tour to md
"codetour_export_to_md",
# copy to /docs/ because it is github standard
"printf $ rsync -a --info=progress2 --delete-after target/doc/ docs/",
"rsync -a --info=progress2 --delete-after target/doc/ docs/",
# create simple index.html file in docs folder
"printf create simple index.html file in docs folder",
"printf \"<meta http-equiv=\\\"refresh\\\" content=\\\"0; url=${CARGO_MAKE_CRATE_NAME}/index.html\\\" />\" > docs/index.html",
# message to help user with next move
"printf after successful doc, run cargo make commit msg_for_commit",
]
[tasks.commit]
description = "cargo fmt and git commit"
clear = true
script = [
"clear",
"printf $ cargo fmt",
"cargo fmt",
"printf $ git add -A",
"git add -A",
"printf $ git commit -a -m \"${@}\"",
"git commit -a -m \"${@}\"",
"printf after successful fmt and git commit, run $ cargo make git_push",
]
[tasks.amend]
description = "git --amend to last commit for small changes and corrections"
clear = true
script = [
"clear",
"printf $ cargo fmt",
"cargo fmt",
"printf $ git add .",
"git add .",
"printf $ git commit --amend",
"git commit --amend",
"printf after successful git commit, run $ cargo make git_push",
]
[tasks.git_push]
description = "push the commits to github, uses ssh agent"
clear = true
script = [
"clear",
"printf $ git push",
"git push",
"printf after successful git push, use $ cargo make crates_io_dry_run or publish_to_web",
]
# end of git script
# end of git script
# end of git script
[tasks.crates_io_dry_run]
clear = true
description = "prepare before publishing to crates.io with dry-run"
script = [
"clear",
"printf $ cargo publish --dry-run",
"cargo publish --dry-run",
"printf after successful dry-run, use $ cargo make crates_io_publish",
]
[tasks.crates_io_publish]
clear = true
description = "git tag and publish to crates.io"
script = [
"clear",
# git tag
"printf $ git tag -f -a v${CARGO_MAKE_CRATE_VERSION} -m version_${CARGO_MAKE_CRATE_VERSION}",
"git tag -f -a v${CARGO_MAKE_CRATE_VERSION} -m version_${CARGO_MAKE_CRATE_VERSION}",
# cargo publish
"printf $ cargo publish",
"cargo publish",
"printf use this command to install new version from crates.io:",
"printf $ cargo install ${CARGO_MAKE_CRATE_NAME}"
]
# end of publish script
# end of publish script
# end of publish script