mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat: support .deb packages (#2807)
Co-authored-by: sxyazi <sxyazi@gmail.com>
This commit is contained in:
parent
2d1cf621db
commit
2768fd22b1
11 changed files with 73 additions and 43 deletions
24
.github/workflows/draft.yml
vendored
24
.github/workflows/draft.yml
vendored
|
|
@ -57,8 +57,10 @@ jobs:
|
|||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yazi-${{ matrix.target }}.zip
|
||||
path: yazi-${{ matrix.target }}.zip
|
||||
name: ${{ matrix.target }}
|
||||
path: |
|
||||
yazi-${{ matrix.target }}.zip
|
||||
yazi-${{ matrix.target }}.deb
|
||||
|
||||
build-windows:
|
||||
strategy:
|
||||
|
|
@ -100,7 +102,7 @@ jobs:
|
|||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yazi-${{ matrix.target }}.zip
|
||||
name: ${{ matrix.target }}
|
||||
path: yazi-${{ matrix.target }}.zip
|
||||
|
||||
build-musl:
|
||||
|
|
@ -128,8 +130,10 @@ jobs:
|
|||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yazi-${{ matrix.target }}.zip
|
||||
path: yazi-${{ matrix.target }}.zip
|
||||
name: ${{ matrix.target }}
|
||||
path: |
|
||||
yazi-${{ matrix.target }}.zip
|
||||
yazi-${{ matrix.target }}.deb
|
||||
|
||||
build-snap:
|
||||
strategy:
|
||||
|
|
@ -160,7 +164,7 @@ jobs:
|
|||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: yazi-${{ matrix.arch }}.snap
|
||||
name: snap-${{ matrix.arch }}
|
||||
path: yazi-${{ matrix.arch }}.snap
|
||||
|
||||
snap:
|
||||
|
|
@ -169,7 +173,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: yazi-*.snap
|
||||
pattern: snap-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Setup snapcraft
|
||||
|
|
@ -180,14 +184,14 @@ jobs:
|
|||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
parallel 'snapcraft push -v --release latest/candidate {}' ::: yazi-*.snap
|
||||
parallel 'snapcraft push -v --release latest/candidate {}' ::: yazi-*.snap || true
|
||||
|
||||
- name: Push snap to edge channel
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
|
||||
run: |
|
||||
parallel 'snapcraft push -v --release latest/edge {}' ::: yazi-*.snap
|
||||
parallel 'snapcraft push -v --release latest/edge {}' ::: yazi-*.snap || true
|
||||
|
||||
draft:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
|
@ -206,6 +210,7 @@ jobs:
|
|||
draft: true
|
||||
files: |
|
||||
yazi-*.zip
|
||||
yazi-*.deb
|
||||
yazi-*.snap
|
||||
generate_release_notes: true
|
||||
|
||||
|
|
@ -241,6 +246,7 @@ jobs:
|
|||
prerelease: true
|
||||
files: |
|
||||
yazi-*.zip
|
||||
yazi-*.deb
|
||||
yazi-*.snap
|
||||
name: Nightly Build
|
||||
body: ${{ env.NIGHTLY_BODY }}
|
||||
|
|
|
|||
34
Cargo.lock
generated
34
Cargo.lock
generated
|
|
@ -194,9 +194,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "avif-serialize"
|
||||
version = "0.8.3"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e"
|
||||
checksum = "19135c0c7a60bfee564dbe44ab5ce0557c6bf3884e5291a50be76a15640c4fbd"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
|
@ -304,9 +304,9 @@ checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b"
|
|||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.18.1"
|
||||
version = "3.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee"
|
||||
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
||||
|
||||
[[package]]
|
||||
name = "by_address"
|
||||
|
|
@ -617,9 +617,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crunchy"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
|
||||
checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
|
|
@ -1165,9 +1165,9 @@ checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
|
|||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.9.0"
|
||||
version = "2.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
|
||||
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
|
|
@ -1324,9 +1324,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
|
||||
checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"libc",
|
||||
|
|
@ -1387,9 +1387,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f8cc7106155f10bdf99a6f379688f543ad6596a415375b36a59a054ceda1198"
|
||||
checksum = "0281c2e25e62316a5c9d98f2d2e9e95a37841afdaf4383c177dbb5c1dfab0568"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
]
|
||||
|
|
@ -3529,7 +3529,6 @@ dependencies = [
|
|||
"regex",
|
||||
"serde",
|
||||
"toml",
|
||||
"toml_edit",
|
||||
"tracing",
|
||||
"yazi-codegen",
|
||||
"yazi-fs",
|
||||
|
|
@ -3545,7 +3544,6 @@ dependencies = [
|
|||
"anyhow",
|
||||
"bitflags 2.9.1",
|
||||
"crossterm 0.29.0",
|
||||
"dirs",
|
||||
"futures",
|
||||
"indexmap",
|
||||
"libc",
|
||||
|
|
@ -3678,6 +3676,10 @@ dependencies = [
|
|||
name = "yazi-macro"
|
||||
version = "25.6.11"
|
||||
|
||||
[[package]]
|
||||
name = "yazi-packing"
|
||||
version = "25.5.28"
|
||||
|
||||
[[package]]
|
||||
name = "yazi-plugin"
|
||||
version = "25.6.11"
|
||||
|
|
@ -3744,7 +3746,7 @@ dependencies = [
|
|||
"async-priority-channel",
|
||||
"futures",
|
||||
"libc",
|
||||
"lru 0.14.0",
|
||||
"lru 0.15.0",
|
||||
"parking_lot",
|
||||
"scopeguard",
|
||||
"tokio",
|
||||
|
|
@ -3773,10 +3775,8 @@ dependencies = [
|
|||
"ordered-float 5.0.0",
|
||||
"parking_lot",
|
||||
"percent-encoding",
|
||||
"ratatui",
|
||||
"serde",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"uzers",
|
||||
"windows-sys 0.60.2",
|
||||
"yazi-macro",
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ dirs = "6.0.0"
|
|||
foldhash = "0.1.5"
|
||||
futures = "0.3.31"
|
||||
globset = "0.4.16"
|
||||
indexmap = { version = "2.9.0", features = [ "serde" ] }
|
||||
indexmap = { version = "2.10.0", features = [ "serde" ] }
|
||||
libc = "0.2.174"
|
||||
lru = "0.14.0"
|
||||
lru = "0.15.0"
|
||||
mlua = { version = "0.10.5", features = [ "anyhow", "async", "error-send", "lua54", "macros", "serialize" ] }
|
||||
objc = "0.2.7"
|
||||
ordered-float = { version = "5.0.0", features = [ "serde" ] }
|
||||
|
|
|
|||
|
|
@ -4,14 +4,24 @@ set -euo pipefail
|
|||
export ARTIFACT_NAME="yazi-$1"
|
||||
export YAZI_GEN_COMPLETIONS=1
|
||||
|
||||
# Build for the target
|
||||
# Build the target
|
||||
git config --global --add safe.directory "*"
|
||||
cargo build --release --locked --target "$1"
|
||||
|
||||
# Use a consistent target directory
|
||||
rm -rf target/release
|
||||
mv "target/$1/release" target/release
|
||||
|
||||
# Package deb
|
||||
if [[ "$ARTIFACT_NAME" == *-linux-* ]] && { [[ "$ARTIFACT_NAME" == *-aarch64-* ]] || [[ "$ARTIFACT_NAME" == *-x86_64-* ]]; }; then
|
||||
cargo install cargo-deb
|
||||
cargo deb -p yazi-packing --no-build -o "$ARTIFACT_NAME.deb"
|
||||
fi
|
||||
|
||||
# Create the artifact
|
||||
mkdir -p "$ARTIFACT_NAME/completions"
|
||||
cp "target/$1/release/ya" "$ARTIFACT_NAME"
|
||||
cp "target/$1/release/yazi" "$ARTIFACT_NAME"
|
||||
cp "target/release/ya" "$ARTIFACT_NAME"
|
||||
cp "target/release/yazi" "$ARTIFACT_NAME"
|
||||
cp yazi-cli/completions/* "$ARTIFACT_NAME/completions"
|
||||
cp yazi-boot/completions/* "$ARTIFACT_NAME/completions"
|
||||
cp README.md LICENSE "$ARTIFACT_NAME"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ parts:
|
|||
- chafa
|
||||
- fd-find
|
||||
- ffmpeg
|
||||
- fzf
|
||||
# - fzf
|
||||
- libglu1-mesa
|
||||
- libglut3.12
|
||||
- poppler-utils
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ ratatui = { workspace = true }
|
|||
regex = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
toml = { workspace = true }
|
||||
toml_edit = "0.22.27"
|
||||
tracing = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ yazi-widgets = { path = "../yazi-widgets", version = "25.6.11" }
|
|||
anyhow = { workspace = true }
|
||||
bitflags = { workspace = true }
|
||||
crossterm = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
notify = { version = "8.0.0", default-features = false, features = [ "macos_fsevent" ] }
|
||||
|
|
|
|||
25
yazi-packing/Cargo.toml
Normal file
25
yazi-packing/Cargo.toml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[package]
|
||||
name = "yazi-packing"
|
||||
version = "25.5.28"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
description = "Yazi packing"
|
||||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[package.metadata.deb]
|
||||
name = "yazi"
|
||||
license-file = [ "../LICENSE", "0" ]
|
||||
depends = "file, ffmpeg, 7zip, jq, poppler-utils, fd-find, ripgrep, fzf, zoxide, imagemagick, xsel|xclip|wl-clipboard"
|
||||
recommends = "bash-completion"
|
||||
extended-description-file = "README.md"
|
||||
section = "utility"
|
||||
priority = "optional"
|
||||
assets = [
|
||||
[ "target/release/ya", "usr/bin/", "755" ],
|
||||
[ "target/release/yazi", "usr/bin/", "755" ],
|
||||
[ "../README.md", "usr/share/doc/yazi/README", "644" ],
|
||||
[ "../yazi-cli/completions/ya.bash", "usr/share/bash-completion/completions/ya", "644" ],
|
||||
[ "../yazi-boot/completions/yazi.bash", "usr/share/bash-completion/completions/yazi", "644" ],
|
||||
]
|
||||
0
yazi-packing/src/lib.rs
Normal file
0
yazi-packing/src/lib.rs
Normal file
|
|
@ -21,10 +21,8 @@ memchr = "2.7.5"
|
|||
ordered-float = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
percent-encoding = "2.3.1"
|
||||
ratatui = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
[target."cfg(unix)".dependencies]
|
||||
libc = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,15 +1,8 @@
|
|||
use yazi_config::keymap::Key;
|
||||
use yazi_macro::render;
|
||||
use yazi_shared::event::CmdCow;
|
||||
|
||||
use crate::input::{Input, InputMode};
|
||||
|
||||
struct Opt;
|
||||
|
||||
impl From<CmdCow> for Opt {
|
||||
fn from(_: CmdCow) -> Self { Self }
|
||||
}
|
||||
|
||||
impl Input {
|
||||
pub fn r#type(&mut self, key: &Key) -> bool {
|
||||
let Some(c) = key.plain() else { return false };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue