mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
Merge 21e007b3f9 into db9e267184
This commit is contained in:
commit
9b9a374997
|
|
@ -67,6 +67,18 @@
|
|||
local bazel="$ZBIN/bazel"; assert "$bazel" is_executable
|
||||
run "$bazel" --version; assert $state equals 0
|
||||
}
|
||||
@test 'bicep' { # Domain-specific language (DSL) for deploying Azure resources declaratively
|
||||
run zinit lbin'!bicep* -> bicep' for @Azure/bicep; assert $state equals 0
|
||||
local bicep="$ZBIN/bicep"; assert "$bicep" is_executable
|
||||
run "$bicep" --version; assert $state equals 0
|
||||
# regression: the asset must match the host libc — musl only on musl systems
|
||||
run ls "${ZINIT[PLUGINS_DIR]}/Azure---bicep"
|
||||
if [[ $OSTYPE == *musl* || "$(command ldd --version 2>&1)" == *musl* ]]; then
|
||||
assert "$output" matches 'musl'
|
||||
else
|
||||
assert "$output" does_not_match 'musl'
|
||||
fi
|
||||
}
|
||||
@test 'blast' { # Blast is a simple tool for API load testing and batch jobs
|
||||
[[ $OSTYPE =~ 'darwin*' ]] && skip "on $os_type"
|
||||
run zinit for @dave/blast; assert $state equals 0
|
||||
|
|
|
|||
|
|
@ -1418,7 +1418,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
fi
|
||||
;;
|
||||
(Linux)
|
||||
_sys='(musl|gnu)*~^*(unknown|)linux*'
|
||||
_sys='linux'
|
||||
[[ $OSTYPE == *musl* || "$(command ldd --version 2>&1)" == *musl* ]] && _clib="musl"
|
||||
;;
|
||||
(MINGW* | MSYS* | CYGWIN* | Windows_NT)
|
||||
_sys='pc-windows-gnu'
|
||||
|
|
@ -1444,7 +1445,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
+zi-log "{e} {b}gh-r{rst}Unsupported CPU: {obj}$_cpu{rst}"
|
||||
;;
|
||||
esac
|
||||
echo "${_sys};${_cpu};${_os}"
|
||||
echo "${_sys};${_cpu};${_os};${_clib}"
|
||||
} # ]]]
|
||||
# FUNCTION: .zinit-get-latest-gh-r-url-part [[[
|
||||
# Gets version string of latest release of given Github
|
||||
|
|
@ -1512,6 +1513,17 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
|
|||
fi
|
||||
done
|
||||
|
||||
# A musl asset is correct only when the host libc is musl — but runs after
|
||||
# the CPU filter so a musl-only arch (e.g. only x86_64 build is musl) still resolves.
|
||||
if (( $#list > 1 )); then
|
||||
if [[ $parts[4] == musl ]]; then
|
||||
filtered=( ${(M)list[@]:#(#i)*musl*} )
|
||||
else
|
||||
filtered=( ${list[@]:#(#i)*musl*} )
|
||||
fi
|
||||
(( $#filtered > 0 )) && list=( ${filtered[@]} )
|
||||
fi
|
||||
|
||||
if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); }
|
||||
|
||||
if (( !$#list )); then
|
||||
|
|
|
|||
Loading…
Reference in a new issue