2020-03-22 04:45:42 +03:00
|
|
|
|
2020-04-16 14:03:55 +03:00
|
|
|
.PHONY: debug build-release release-linux-musl test clippy clippy-pedantic install install-debug
|
2020-03-28 22:47:29 +03:00
|
|
|
|
2021-06-02 01:14:51 +03:00
|
|
|
ARGS=-l
|
2023-09-03 19:34:09 +03:00
|
|
|
# ARGS=-l -d ~/code/extern/kubernetes
|
2023-08-26 21:34:37 +03:00
|
|
|
# ARGS=-l -d ~/code/extern/linux
|
2021-12-05 02:35:45 +03:00
|
|
|
# ARGS=-l -d ~/code/git-bare-test.git -w ~/code/git-bare-test
|
2021-06-02 01:14:51 +03:00
|
|
|
|
2020-07-04 15:59:30 +03:00
|
|
|
profile:
|
2023-08-28 13:35:01 +03:00
|
|
|
sudo CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --features timing -- ${ARGS}
|
2020-07-04 15:59:30 +03:00
|
|
|
|
2021-08-17 15:21:24 +03:00
|
|
|
run-timing:
|
|
|
|
cargo run --features=timing --release -- ${ARGS}
|
|
|
|
|
2020-03-22 04:45:42 +03:00
|
|
|
debug:
|
2021-06-02 01:14:51 +03:00
|
|
|
RUST_BACKTRACE=true cargo run --features=timing -- ${ARGS}
|
2020-03-22 04:45:42 +03:00
|
|
|
|
2020-04-06 11:18:26 +03:00
|
|
|
build-release:
|
2024-03-27 20:28:31 +03:00
|
|
|
cargo build --release --locked
|
2020-04-15 17:36:40 +03:00
|
|
|
|
|
|
|
release-mac: build-release
|
|
|
|
strip target/release/gitui
|
2021-06-07 15:58:49 +03:00
|
|
|
otool -L target/release/gitui
|
2024-02-12 14:03:31 +03:00
|
|
|
ls -lisah target/release/gitui
|
2020-04-15 17:36:40 +03:00
|
|
|
mkdir -p release
|
|
|
|
tar -C ./target/release/ -czvf ./release/gitui-mac.tar.gz ./gitui
|
2020-06-15 03:25:18 +03:00
|
|
|
ls -lisah ./release/gitui-mac.tar.gz
|
2020-04-15 17:36:40 +03:00
|
|
|
|
2020-04-19 20:20:30 +03:00
|
|
|
release-win: build-release
|
|
|
|
mkdir -p release
|
2020-04-19 20:27:39 +03:00
|
|
|
tar -C ./target/release/ -czvf ./release/gitui-win.tar.gz ./gitui.exe
|
2022-08-17 17:30:54 +03:00
|
|
|
cargo install cargo-wix --version 0.3.3
|
2024-03-27 15:51:00 +03:00
|
|
|
cargo wix -p gitui --no-build --nocapture --output ./release/gitui-win.msi
|
|
|
|
ls -l ./release/gitui-win.msi
|
2020-04-19 20:20:30 +03:00
|
|
|
|
2020-09-01 02:36:38 +03:00
|
|
|
release-linux-musl: build-linux-musl-release
|
2020-04-16 14:03:55 +03:00
|
|
|
strip target/x86_64-unknown-linux-musl/release/gitui
|
2020-04-15 17:36:40 +03:00
|
|
|
mkdir -p release
|
2024-03-27 15:51:00 +03:00
|
|
|
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-x86_64.tar.gz ./gitui
|
2020-04-06 11:18:26 +03:00
|
|
|
|
2020-09-01 02:36:38 +03:00
|
|
|
build-linux-musl-debug:
|
2020-10-10 18:52:11 +03:00
|
|
|
cargo build --target=x86_64-unknown-linux-musl
|
2020-09-01 02:36:38 +03:00
|
|
|
|
|
|
|
build-linux-musl-release:
|
2024-03-27 20:28:31 +03:00
|
|
|
cargo build --release --target=x86_64-unknown-linux-musl
|
2020-09-01 02:36:38 +03:00
|
|
|
|
2020-09-02 03:08:41 +03:00
|
|
|
test-linux-musl:
|
2020-10-10 18:52:11 +03:00
|
|
|
cargo test --workspace --target=x86_64-unknown-linux-musl
|
2020-09-02 03:08:41 +03:00
|
|
|
|
2022-11-05 18:46:11 +03:00
|
|
|
release-linux-arm: build-linux-arm-release
|
|
|
|
mkdir -p release
|
|
|
|
|
|
|
|
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/gitui
|
|
|
|
arm-linux-gnueabihf-strip target/armv7-unknown-linux-gnueabihf/release/gitui
|
|
|
|
arm-linux-gnueabihf-strip target/arm-unknown-linux-gnueabihf/release/gitui
|
|
|
|
|
|
|
|
tar -C ./target/aarch64-unknown-linux-gnu/release/ -czvf ./release/gitui-linux-aarch64.tar.gz ./gitui
|
|
|
|
tar -C ./target/armv7-unknown-linux-gnueabihf/release/ -czvf ./release/gitui-linux-armv7.tar.gz ./gitui
|
|
|
|
tar -C ./target/arm-unknown-linux-gnueabihf/release/ -czvf ./release/gitui-linux-arm.tar.gz ./gitui
|
|
|
|
|
|
|
|
build-linux-arm-debug:
|
|
|
|
cargo build --target=aarch64-unknown-linux-gnu
|
|
|
|
cargo build --target=armv7-unknown-linux-gnueabihf
|
|
|
|
cargo build --target=arm-unknown-linux-gnueabihf
|
|
|
|
|
|
|
|
build-linux-arm-release:
|
2024-03-27 20:28:31 +03:00
|
|
|
cargo build --release --target=aarch64-unknown-linux-gnu
|
|
|
|
cargo build --release --target=armv7-unknown-linux-gnueabihf
|
|
|
|
cargo build --release --target=arm-unknown-linux-gnueabihf
|
2022-11-05 18:46:11 +03:00
|
|
|
|
2020-03-26 12:08:28 +03:00
|
|
|
test:
|
2020-03-28 11:39:16 +03:00
|
|
|
cargo test --workspace
|
2020-03-26 12:08:28 +03:00
|
|
|
|
2020-05-23 16:23:53 +03:00
|
|
|
fmt:
|
2020-05-22 23:43:47 +03:00
|
|
|
cargo fmt -- --check
|
2020-05-23 16:23:53 +03:00
|
|
|
|
|
|
|
clippy:
|
2021-05-09 14:15:00 +03:00
|
|
|
cargo clippy --workspace --all-features
|
2020-03-27 02:41:59 +03:00
|
|
|
|
2020-09-27 19:56:20 +03:00
|
|
|
clippy-nightly:
|
2021-05-24 01:28:17 +03:00
|
|
|
cargo +nightly clippy --workspace --all-features
|
2020-09-27 19:56:20 +03:00
|
|
|
|
2022-08-17 20:48:14 +03:00
|
|
|
check: fmt clippy test deny
|
|
|
|
|
2024-02-19 13:27:34 +03:00
|
|
|
check-nightly:
|
|
|
|
cargo +nightly c
|
|
|
|
cargo +nightly clippy --workspace --all-features
|
|
|
|
cargo +nightly t
|
|
|
|
|
2022-08-17 20:48:14 +03:00
|
|
|
deny:
|
|
|
|
cargo deny check
|
2020-05-23 16:23:53 +03:00
|
|
|
|
2020-03-22 04:45:42 +03:00
|
|
|
install:
|
2023-08-01 11:09:15 +03:00
|
|
|
cargo install --path "." --offline --locked
|
2020-03-22 04:45:42 +03:00
|
|
|
|
2020-06-29 17:00:21 +03:00
|
|
|
install-timing:
|
2023-08-01 11:09:15 +03:00
|
|
|
cargo install --features=timing --path "." --offline --locked
|
2022-01-02 13:33:52 +03:00
|
|
|
|
|
|
|
licenses:
|
2022-10-15 17:12:50 +03:00
|
|
|
cargo bundle-licenses --format toml --output THIRDPARTY.toml
|
|
|
|
|
|
|
|
clean:
|
2024-03-27 16:07:05 +03:00
|
|
|
cargo clean
|