mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
ci: musl build should include commit hash
This commit is contained in:
parent
c38be35250
commit
ce23dcd81b
4 changed files with 14 additions and 32 deletions
20
.github/workflows/draft.yml
vendored
20
.github/workflows/draft.yml
vendored
|
|
@ -16,40 +16,28 @@ jobs:
|
|||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: i686-unknown-linux-gnu
|
||||
gcc: gcc-i686-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
gcc: gcc-aarch64-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: i686-unknown-linux-gnu
|
||||
gcc: gcc-i686-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: riscv64gc-unknown-linux-gnu
|
||||
gcc: gcc-riscv64-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: powerpc64-unknown-linux-gnu
|
||||
gcc: gcc-powerpc64-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: powerpc64le-unknown-linux-gnu
|
||||
gcc: gcc-powerpc64le-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: sparc64-unknown-linux-gnu
|
||||
gcc: gcc-sparc64-linux-gnu
|
||||
- os: ubuntu-latest
|
||||
target: s390x-unknown-linux-gnu
|
||||
gcc: gcc-s390x-linux-gnu
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER: i686-linux-gnu-gcc
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||
CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER: i686-linux-gnu-gcc
|
||||
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER: riscv64-linux-gnu-gcc
|
||||
CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER: powerpc64-linux-gnu-gcc
|
||||
CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER: powerpc64le-linux-gnu-gcc
|
||||
CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER: sparc64-linux-gnu-gcc
|
||||
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER: s390x-linux-gnu-gcc
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export ARTIFACT_NAME="yazi-$1"
|
|||
export YAZI_GEN_COMPLETIONS=1
|
||||
|
||||
# Build for the target
|
||||
git config --global --add safe.directory "*"
|
||||
cargo build --release --locked --target "$1"
|
||||
|
||||
# Create the artifact
|
||||
|
|
|
|||
|
|
@ -5,13 +5,14 @@ use crate::tab::Tab;
|
|||
|
||||
impl Tab {
|
||||
pub fn linemode(&mut self, mut c: CmdCow) {
|
||||
render!(self.pref.patch(|new| {
|
||||
let Some(mode) = c.take_first_str() else {
|
||||
return;
|
||||
};
|
||||
if !mode.is_empty() && mode.len() <= 20 {
|
||||
new.linemode = mode.into_owned();
|
||||
}
|
||||
}));
|
||||
let Some(new) = c.take_first_str() else { return };
|
||||
if new == self.pref.linemode {
|
||||
return;
|
||||
} else if new.is_empty() || new.len() > 20 {
|
||||
return;
|
||||
}
|
||||
|
||||
self.pref.linemode = new.into_owned();
|
||||
render!();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,14 +32,6 @@ impl Default for Preference {
|
|||
}
|
||||
}
|
||||
|
||||
impl Preference {
|
||||
pub(super) fn patch<F: FnOnce(&mut Self)>(&mut self, f: F) -> bool {
|
||||
let old = self.clone();
|
||||
f(self);
|
||||
*self != old
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&Preference> for FilesSorter {
|
||||
fn from(value: &Preference) -> Self {
|
||||
FilesSorter {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue