Create debs
Build and test / check (push) Successful in 1m8s
Build and test / build (push) Successful in 1m52s
Build and test / test (push) Successful in 2m15s
Build and test / docs (push) Successful in 6m24s

This commit is contained in:
2026-07-20 23:09:13 +09:00
parent ba0e8f214d
commit b1f75b225c
9 changed files with 270 additions and 3 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail
declare -r RUST_PROFILE="releaselto"
if [[ "${CREATE_DEB_DEBUG:-}" == "1" ]]; then
set -x
fi
if ! command -v cargo &> /dev/null; then
echo "cargo could not be found" >&2
exit 1
fi
if ! command -v cargo-deb &> /dev/null; then
echo "cargo-deb could not be found" >&2
exit 1
fi
cargo build --profile "$RUST_PROFILE"
mkdir -p assets/completions
for bin in finger ruptime rwho; do
(
PATH="./target/$RUST_PROFILE:$PATH"
"$bin" --completions=bash > "assets/completions/$bin.bash"
"$bin" --completions=zsh > "assets/completions/_$bin"
"$bin" --completions=fish > "assets/completions/$bin.fish"
)
done
DEFAULT_CARGO_DEB_ARGS=(
--profile "$RUST_PROFILE"
--no-build
)
cargo deb "${DEFAULT_CARGO_DEB_ARGS[@]}" "$@"