-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
justfile
88 lines (53 loc) · 1.73 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
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
set windows-powershell := true
all:
cargo run --release
# call before pull request
pull: fmt prettier fix test
################### Build Libs
libsensors:
git submodule update --init hardware/libsensors
make -C ./hardware/libsensors/ install PREFIX=./../../build/libsensors ETCDIR=./../../build/libsensors/etc
lhm:
dotnet build ./hardware/LibreHardwareMonitorWrapper/ -c Release
################### Packaging
nsis:
cargo packager --release --formats nsis --verbose
New-Item -Path .\packages -ItemType Directory -Force > $null
cp ./target/release/fan-control*-setup.exe ./packages/
################### Test
test:
cargo test --workspace --all-features
################### Format
fix:
cargo clippy --workspace --all-features --fix --allow-dirty --allow-staged
fmt:
cargo fmt --all
prettier:
# install on Debian: sudo snap install node --classic
# npx is the command to run npm package, node is the runtime
npx prettier -w .
# todo: add to CI when ubuntu-image get appstream version 1.0
metainfo-check:
appstreamcli validate --pedantic --explain --strict res/linux/metainfo.xml
fmt-lhm:
dotnet format ./hardware/LibreHardwareMonitorWrapper/LibreHardwareMonitorWrapper.csproj
################### Clean
clean-libsensors:
make -C ./hardware/libsensors clean || true
rm -rf build/libsensors || true
clean-lhm:
dotnet clean ./hardware/LibreHardwareMonitorWrapper/ || true
################### Handy
fake:
cargo run --features fake_hardware -- -p ./configs-examples
temp:
cargo run --features fake_hardware -- -p ./temp
conf:
cargo run -- -p ./configs-examples
git-cache:
git rm -rf --cached .
git add .
run-lhm:
dotnet run --project ./hardware/LibreHardwareMonitorWrapper/ -c Release --log=info
expand:
cargo expand