mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
ci/lint: Fix lint-shell.sh in CI (#4489)
* lint: Skip shell linting if gawk is not installed * lint: Skip Gitian descriptor scripts checking if jq is not installed * ci: Install gawk and jq `yq` requires `jq` * Fix shellcheck warnings
This commit is contained in:
parent
35ed2b08c1
commit
77b2cfc374
@ -40,7 +40,7 @@ RUN apt-get update && apt-get install $APT_ARGS g++-arm-linux-gnueabihf && rm -r
|
||||
RUN apt-get update && apt-get install $APT_ARGS g++-mingw-w64-x86-64 && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install $APT_ARGS wine-stable wine32 wine64 bc nsis xorriso && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install $APT_ARGS python3-zmq && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install $APT_ARGS cppcheck && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install $APT_ARGS cppcheck gawk jq && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install $APT_ARGS imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG SHELLCHECK_VERSION=v0.7.1
|
||||
|
@ -180,7 +180,7 @@ script: |
|
||||
find . -name "lib*.la" -delete
|
||||
find . -name "lib*.a" -delete
|
||||
rm -rf ${DISTNAME}/lib/pkgconfig
|
||||
find .. -name *.dSYM -exec cp -ra {} ${DISTNAME}/bin \;
|
||||
find .. -name "*.dSYM" -exec cp -ra {} ${DISTNAME}/bin \;
|
||||
find ${DISTNAME} -not -path '*.dSYM*' | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
|
||||
find ${DISTNAME} -path '*.dSYM*' | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
|
||||
cd ../../
|
||||
|
@ -180,7 +180,7 @@ script: |
|
||||
make ${MAKEOPTS} -C src check-security
|
||||
make deploy
|
||||
make install DESTDIR=${INSTALLPATH}
|
||||
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
|
||||
rename 's/-setup\.exe$/-setup-unsigned.exe/' "*-setup.exe"
|
||||
cp -f dashcore-*setup*.exe $OUTDIR/
|
||||
cd installed
|
||||
mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
|
||||
|
@ -47,7 +47,7 @@ if test -n "@debug@" && test -z "@no_qt@" && test "x$with_gui" != xno; then
|
||||
with_gui=qt5_debug
|
||||
fi
|
||||
|
||||
if test x@host_os@ = xdarwin; then
|
||||
if test "@host_os@" = darwin; then
|
||||
BREW=no
|
||||
PORT=no
|
||||
fi
|
||||
|
@ -50,6 +50,11 @@ if ! command -v shellcheck > /dev/null; then
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
if ! command -v gawk > /dev/null; then
|
||||
echo "Skipping shell linting since gawk is not installed."
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
EXCLUDE="--exclude=$(IFS=','; echo "${disabled[*]}")"
|
||||
SOURCED_FILES=$(git ls-files | xargs gawk '/^# shellcheck shell=/ {print FILENAME} {nextfile}') # Check shellcheck directive used for sourced files
|
||||
if ! shellcheck "$EXCLUDE" $SOURCED_FILES $(git ls-files -- '*.sh' | grep -vE 'src/(leveldb|secp256k1|univalue)/'); then
|
||||
@ -61,6 +66,11 @@ if ! command -v yq > /dev/null; then
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
if ! command -v jq > /dev/null; then
|
||||
echo "Skipping Gitian descriptor scripts checking since jq is not installed."
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
EXCLUDE_GITIAN=${EXCLUDE}",$(IFS=','; echo "${disabled_gitian[*]}")"
|
||||
for descriptor in $(git ls-files -- 'contrib/gitian-descriptors/*.yml')
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user