-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
40 lines (31 loc) · 1.1 KB
/
justfile
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
app_name := "week_calendar"
linux_gnu_target := "x86_64-unknown-linux-gnu"
release_folder := "release"
tar_file_name := release_folder / app_name + "_" + linux_gnu_target + ".gz.tar"
checksum := release_folder / "checksum_sha256.txt"
# Executes all commands which should be before any push or pull request
# These steps should be executed within a CI too.
ci: format_check test lint spelling
# Runs static analyses to improve code quality
lint:
cargo clippy -- -Dwarnings
# Checks if code is formatted correctly
format_check:
cargo fmt --check --all
test:
cargo test --all
spelling:
typos
generate_manual:
cargo xtask generate-manual
build_readme: generate_manual
cargo xtask build-readme
local-install:
cargo install --path . --force
local-release:
cargo build --target {{ linux_gnu_target }} --release
rm -fr {{ release_folder }}
mkdir {{ release_folder }}
tar --create --gzip --file {{ tar_file_name }} README.md CHANGELOG.md LICENSE-MIT LICENSE-APACHE Examples.md -C ./target/release/ {{ app_name }}
sha256sum {{ tar_file_name }} > {{ checksum }}
sd 'release/' '' {{ checksum }}