mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 14:51:03 +00:00
fix: do not change revision when package deployment fails (#2627)
This commit is contained in:
parent
d2cc73c927
commit
56d6e4a71e
13 changed files with 121 additions and 55 deletions
4
.github/workflows/cachix.yml
vendored
4
.github/workflows/cachix.yml
vendored
|
|
@ -15,10 +15,10 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v25
|
||||
uses: cachix/install-nix-action@v31
|
||||
|
||||
- name: Authenticate with Cachix
|
||||
uses: cachix/cachix-action@v14
|
||||
uses: cachix/cachix-action@v16
|
||||
with:
|
||||
name: yazi
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
|
|
|||
4
.github/workflows/check.yml
vendored
4
.github/workflows/check.yml
vendored
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
rustup component add clippy
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --all
|
||||
|
|
@ -39,7 +39,7 @@ jobs:
|
|||
rustup component add rustfmt --toolchain nightly
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Rustfmt
|
||||
run: rustfmt +nightly --check **/*.rs
|
||||
|
|
|
|||
10
.github/workflows/draft.yml
vendored
10
.github/workflows/draft.yml
vendored
|
|
@ -61,7 +61,7 @@ jobs:
|
|||
run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Build
|
||||
run: ./scripts/build.sh ${{ matrix.target }}
|
||||
|
|
@ -93,7 +93,7 @@ jobs:
|
|||
run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Build
|
||||
run: cargo build --profile release-windows --locked --target ${{ matrix.target }}
|
||||
|
|
@ -133,7 +133,7 @@ jobs:
|
|||
run: rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Build
|
||||
run: ./scripts/build.sh ${{ matrix.target }}
|
||||
|
|
@ -214,7 +214,7 @@ jobs:
|
|||
merge-multiple: true
|
||||
|
||||
- name: Draft
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
|
|
@ -248,7 +248,7 @@ jobs:
|
|||
git tag --force nightly && git push --force origin tag nightly
|
||||
|
||||
- name: Nightly
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: nightly
|
||||
prerelease: true
|
||||
|
|
|
|||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
run: rustup toolchain install stable --profile minimal
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.6
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
|
|
|||
120
Cargo.lock
generated
120
Cargo.lock
generated
|
|
@ -118,9 +118,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.97"
|
||||
version = "1.0.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
|
||||
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
||||
|
||||
[[package]]
|
||||
name = "arbitrary"
|
||||
|
|
@ -328,9 +328,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.18"
|
||||
version = "1.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c"
|
||||
checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
|
|
@ -367,9 +367,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.35"
|
||||
version = "4.5.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944"
|
||||
checksum = "2df961d8c8a0d08aa9945718ccf584145eee3f3aa06cddbeac12933781102e04"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
|
|
@ -377,9 +377,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.35"
|
||||
version = "4.5.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9"
|
||||
checksum = "132dbda40fb6753878316a489d5a1242a8ef2f0d9e47ba01c951ea8aa7d013a5"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
|
|
@ -490,6 +490,15 @@ dependencies = [
|
|||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.7"
|
||||
|
|
@ -547,12 +556,30 @@ checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
|
|||
dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
"crossterm_winapi",
|
||||
"mio",
|
||||
"parking_lot",
|
||||
"rustix 0.38.44",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossterm"
|
||||
version = "0.29.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
|
||||
dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
"crossterm_winapi",
|
||||
"derive_more",
|
||||
"document-features",
|
||||
"filedescriptor",
|
||||
"futures-core",
|
||||
"libc",
|
||||
"mio",
|
||||
"parking_lot",
|
||||
"rustix 0.38.44",
|
||||
"rustix 1.0.5",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
|
|
@ -658,6 +685,27 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678"
|
||||
dependencies = [
|
||||
"derive_more-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more-impl"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
|
|
@ -689,6 +737,15 @@ dependencies = [
|
|||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "document-features"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
|
||||
dependencies = [
|
||||
"litrs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.15.0"
|
||||
|
|
@ -1228,9 +1285,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.171"
|
||||
version = "0.2.172"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
||||
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
|
|
@ -1265,6 +1322,12 @@ version = "0.9.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
|
||||
|
||||
[[package]]
|
||||
name = "litrs"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.12"
|
||||
|
|
@ -1301,9 +1364,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.13.0"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465"
|
||||
checksum = "9f8cc7106155f10bdf99a6f379688f543ad6596a415375b36a59a054ceda1198"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
]
|
||||
|
|
@ -1793,9 +1856,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.94"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
||||
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
|
@ -1897,7 +1960,7 @@ dependencies = [
|
|||
"bitflags 2.9.0",
|
||||
"cassowary",
|
||||
"compact_str",
|
||||
"crossterm",
|
||||
"crossterm 0.28.1",
|
||||
"indoc",
|
||||
"instability",
|
||||
"itertools 0.13.0",
|
||||
|
|
@ -1946,9 +2009,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ravif"
|
||||
version = "0.11.11"
|
||||
version = "0.11.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6"
|
||||
checksum = "d6a5f31fcf7500f9401fea858ea4ab5525c99f2322cfcee732c0e6c74208c0c6"
|
||||
dependencies = [
|
||||
"avif-serialize",
|
||||
"imgref",
|
||||
|
|
@ -2772,9 +2835,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "vergen-gitcl"
|
||||
version = "1.0.7"
|
||||
version = "1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92ee058141ff0fab661d1e2837d1cf0fe1ac6173cf46224e25cec21e780eb5cc"
|
||||
checksum = "b9dfc1de6eb2e08a4ddf152f1b179529638bedc0ea95e6d667c014506377aefe"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"derive_builder",
|
||||
|
|
@ -3165,7 +3228,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"base64",
|
||||
"color_quant",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"image",
|
||||
"ratatui",
|
||||
"scopeguard",
|
||||
|
|
@ -3215,7 +3278,7 @@ dependencies = [
|
|||
"clap_complete",
|
||||
"clap_complete_fig",
|
||||
"clap_complete_nushell",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
|
|
@ -3243,7 +3306,7 @@ version = "25.4.8"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.0",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"globset",
|
||||
"indexmap",
|
||||
"ratatui",
|
||||
|
|
@ -3263,7 +3326,7 @@ version = "25.4.8"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.9.0",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"dirs",
|
||||
"futures",
|
||||
"indexmap",
|
||||
|
|
@ -3331,7 +3394,7 @@ version = "25.4.8"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"better-panic",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"fdlimit",
|
||||
"foldhash",
|
||||
"futures",
|
||||
|
|
@ -3402,7 +3465,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"base64",
|
||||
"clipboard-win",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"futures",
|
||||
"globset",
|
||||
"libc",
|
||||
|
|
@ -3460,7 +3523,7 @@ dependencies = [
|
|||
"async-priority-channel",
|
||||
"futures",
|
||||
"libc",
|
||||
"lru 0.13.0",
|
||||
"lru 0.14.0",
|
||||
"parking_lot",
|
||||
"scopeguard",
|
||||
"tokio",
|
||||
|
|
@ -3480,7 +3543,7 @@ name = "yazi-shared"
|
|||
version = "25.4.8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"crossterm",
|
||||
"crossterm 0.29.0",
|
||||
"futures",
|
||||
"libc",
|
||||
"memchr",
|
||||
|
|
@ -3499,6 +3562,7 @@ dependencies = [
|
|||
name = "yazi-widgets"
|
||||
version = "25.4.8"
|
||||
dependencies = [
|
||||
"crossterm 0.29.0",
|
||||
"futures",
|
||||
"ratatui",
|
||||
"unicode-width 0.2.0",
|
||||
|
|
|
|||
10
Cargo.toml
10
Cargo.toml
|
|
@ -15,19 +15,19 @@ panic = "unwind"
|
|||
|
||||
[workspace.dependencies]
|
||||
ansi-to-tui = "7.0.0"
|
||||
anyhow = "1.0.97"
|
||||
anyhow = "1.0.98"
|
||||
base64 = "0.22.1"
|
||||
bitflags = "2.9.0"
|
||||
clap = { version = "4.5.35", features = [ "derive" ] }
|
||||
clap = { version = "4.5.36", features = [ "derive" ] }
|
||||
core-foundation-sys = "0.8.7"
|
||||
crossterm = { version = "0.28.1", features = [ "event-stream" ] }
|
||||
crossterm = { version = "0.29.0", features = [ "event-stream" ] }
|
||||
dirs = "6.0.0"
|
||||
foldhash = "0.1.5"
|
||||
futures = "0.3.31"
|
||||
globset = "0.4.16"
|
||||
indexmap = { version = "2.9.0", features = [ "serde" ] }
|
||||
libc = "0.2.171"
|
||||
lru = "0.13.0"
|
||||
libc = "0.2.172"
|
||||
lru = "0.14.0"
|
||||
md-5 = "0.10.6"
|
||||
mlua = { version = "0.10.3", features = [ "anyhow", "async", "error-send", "lua54", "macros", "serialize" ] }
|
||||
objc = "0.2.7"
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ clap = { workspace = true }
|
|||
clap_complete = "4.5.47"
|
||||
clap_complete_fig = "4.5.2"
|
||||
clap_complete_nushell = "4.5.5"
|
||||
vergen-gitcl = { version = "1.0.7", features = [ "build", "rustc" ] }
|
||||
vergen-gitcl = { version = "1.0.8", features = [ "build", "rustc" ] }
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ clap_complete = "4.5.47"
|
|||
clap_complete_fig = "4.5.2"
|
||||
clap_complete_nushell = "4.5.5"
|
||||
serde_json = { workspace = true }
|
||||
vergen-gitcl = { version = "1.0.7", features = [ "build" ] }
|
||||
vergen-gitcl = { version = "1.0.8", features = [ "build" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ impl Dependency {
|
|||
Git::clone(&self.remote(), &path).await?;
|
||||
};
|
||||
|
||||
self.deploy().await?;
|
||||
self.rev = Git::revision(&path).await?;
|
||||
self.deploy().await
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@ impl Dependency {
|
|||
self.header("Fetching package `{name}`")?;
|
||||
|
||||
let path = self.local();
|
||||
if !must_exists(&path).await {
|
||||
Git::clone(&self.remote(), &path).await?;
|
||||
} else {
|
||||
if must_exists(&path).await {
|
||||
Git::fetch(&path).await?;
|
||||
} else {
|
||||
Git::clone(&self.remote(), &path).await?;
|
||||
};
|
||||
|
||||
if self.rev.is_empty() {
|
||||
self.rev = Git::revision(&path).await?;
|
||||
} else {
|
||||
if !self.rev.is_empty() {
|
||||
Git::checkout(&path, self.rev.trim_start_matches('=')).await?;
|
||||
}
|
||||
|
||||
self.deploy().await
|
||||
self.deploy().await?;
|
||||
self.rev = Git::revision(&path).await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ tokio-util = { workspace = true }
|
|||
tracing = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
vergen-gitcl = { version = "1.0.7", features = [ "build" ] }
|
||||
vergen-gitcl = { version = "1.0.8", features = [ "build" ] }
|
||||
|
||||
[target."cfg(unix)".dependencies]
|
||||
uzers = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ yazi-plugin = { path = "../yazi-plugin", version = "25.4.8" }
|
|||
yazi-shared = { path = "../yazi-shared", version = "25.4.8" }
|
||||
|
||||
# External dependencies
|
||||
crossterm = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
unicode-width = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::ops::Range;
|
||||
|
||||
use ratatui::crossterm::cursor::SetCursorStyle;
|
||||
use crossterm::cursor::SetCursorStyle;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
use yazi_config::YAZI;
|
||||
use yazi_plugin::CLIPBOARD;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue