ci: Add shellcheck for scripts (#20631)

Fixes shellcheck errors in script/*
Adds a couple trailing newlines.
Adds `script/shellcheck-scripts` and associated CI machinery.
Current set ultra-conservative, does not output warnings, only errors.
This commit is contained in:
Peter Tripp 2024-11-18 21:41:22 +00:00 committed by GitHub
parent 5b317f60df
commit 5b9916e34b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 48 additions and 12 deletions

View file

@ -69,7 +69,9 @@ strip --strip-debug "${target_dir}/${remote_server_triple}/release/remote_server
# Ensure that remote_server does not depend on libssl nor libcrypto, as we got rid of these deps.
! ldd "${target_dir}/${remote_server_triple}/release/remote_server" | grep -q 'libcrypto\|libssl'
if ldd "${target_dir}/${remote_server_triple}/release/remote_server" | grep -q 'libcrypto\|libssl'; then
echo "Error: remote_server still depends on libssl or libcrypto" && exit 1
fi
suffix=""
if [ "$channel" != "stable" ]; then
@ -89,8 +91,8 @@ cp "${target_dir}/${target_triple}/release/cli" "${zed_dir}/bin/zed"
# Libs
find_libs() {
ldd ${target_dir}/${target_triple}/release/zed |\
cut -d' ' -f3 |\
grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\)'
cut -d' ' -f3 |\
grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\)'
}
mkdir -p "${zed_dir}/lib"