script: Enable SC2006 rule for Gitian scripts

This commit is contained in:
Hennadii Stepanov 2019-11-03 21:39:19 +02:00
parent 14aded46df
commit 577682d9e8
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F
6 changed files with 23 additions and 24 deletions

View File

@ -51,7 +51,7 @@ script: |
export QT_RCC_TEST=1 export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1 export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC" export TZ="UTC"
export BUILD_DIR=`pwd` export BUILD_DIR=$(pwd)
mkdir -p ${WRAP_DIR} mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE} export SOURCES_PATH=${GBUILD_COMMON_CACHE}
@ -107,7 +107,7 @@ script: |
rm -f ${WRAP_DIR}/${prog} rm -f ${WRAP_DIR}/${prog}
cat << EOF > ${WRAP_DIR}/${prog} cat << EOF > ${WRAP_DIR}/${prog}
#!/usr/bin/env bash #!/usr/bin/env bash
REAL="`which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1`" REAL="$(which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1)"
for var in "\$@" for var in "\$@"
do do
if [ "\$var" = "-m32" ]; then if [ "\$var" = "-m32" ]; then
@ -122,7 +122,7 @@ script: |
done done
cd bitcoin cd bitcoin
BASEPREFIX=`pwd`/depends BASEPREFIX=$(pwd)/depends
# Build dependencies for each host # Build dependencies for each host
for i in $HOSTS; do for i in $HOSTS; do
EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i" EXTRA_INCLUDES="$EXTRA_INCLUDES_BASE/$i"
@ -141,10 +141,10 @@ script: |
# Create the release tarball using (arbitrarily) the first host # Create the release tarball using (arbitrarily) the first host
./autogen.sh ./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist make dist
SOURCEDIST=`echo bitcoin-*.tar.gz` SOURCEDIST=$(echo bitcoin-*.tar.gz)
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
# Correct tar file order # Correct tar file order
mkdir -p temp mkdir -p temp
pushd temp pushd temp
@ -161,7 +161,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i} mkdir -p distsrc-${i}
cd distsrc-${i} cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME} INSTALLPATH=$(pwd)/installed/${DISTNAME}
mkdir -p ${INSTALLPATH} mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST tar --strip-components=1 -xf ../$SOURCEDIST

View File

@ -17,7 +17,7 @@ script: |
WRAP_DIR=$HOME/wrapped WRAP_DIR=$HOME/wrapped
mkdir -p ${WRAP_DIR} mkdir -p ${WRAP_DIR}
export PATH=`pwd`:$PATH export PATH=$(pwd):$PATH
FAKETIME_PROGS="dmg genisoimage" FAKETIME_PROGS="dmg genisoimage"
# Create global faketime wrappers # Create global faketime wrappers

View File

@ -45,7 +45,7 @@ script: |
export QT_RCC_TEST=1 export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1 export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC" export TZ="UTC"
export BUILD_DIR=`pwd` export BUILD_DIR=$(pwd)
mkdir -p ${WRAP_DIR} mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE} export SOURCES_PATH=${GBUILD_COMMON_CACHE}
@ -86,7 +86,7 @@ script: |
export PATH=${WRAP_DIR}:${PATH} export PATH=${WRAP_DIR}:${PATH}
cd bitcoin cd bitcoin
BASEPREFIX=`pwd`/depends BASEPREFIX=$(pwd)/depends
mkdir -p ${BASEPREFIX}/SDKs mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.11.sdk.tar.gz
@ -104,10 +104,10 @@ script: |
# Create the release tarball using (arbitrarily) the first host # Create the release tarball using (arbitrarily) the first host
./autogen.sh ./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist make dist
SOURCEDIST=`echo bitcoin-*.tar.gz` SOURCEDIST=$(echo bitcoin-*.tar.gz)
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
# Correct tar file order # Correct tar file order
mkdir -p temp mkdir -p temp
@ -125,7 +125,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i} mkdir -p distsrc-${i}
cd distsrc-${i} cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME} INSTALLPATH=$(pwd)/installed/${DISTNAME}
mkdir -p ${INSTALLPATH} mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST tar --strip-components=1 -xf ../$SOURCEDIST

View File

@ -19,7 +19,7 @@ files:
script: | script: |
set -e -o pipefail set -e -o pipefail
BUILD_DIR=`pwd` BUILD_DIR=$(pwd)
SIGDIR=${BUILD_DIR}/signature/win SIGDIR=${BUILD_DIR}/signature/win
UNSIGNED_DIR=${BUILD_DIR}/unsigned UNSIGNED_DIR=${BUILD_DIR}/unsigned
@ -36,7 +36,7 @@ script: |
./configure --without-gsf --without-curl --disable-dependency-tracking ./configure --without-gsf --without-curl --disable-dependency-tracking
make make
find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do find ${UNSIGNED_DIR} -name "*-unsigned.exe" | while read i; do
INFILE="`basename "${i}"`" INFILE="$(basename "${i}")"
OUTFILE="`echo "${INFILE}" | sed s/-unsigned//`" OUTFILE="$(echo "${INFILE}" | sed s/-unsigned//)"
./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem" ./osslsigncode attach-signature -in "${i}" -out "${OUTDIR}/${OUTFILE}" -sigin "${SIGDIR}/${INFILE}.pem"
done done

View File

@ -40,7 +40,7 @@ script: |
export QT_RCC_TEST=1 export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1 export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC" export TZ="UTC"
export BUILD_DIR=`pwd` export BUILD_DIR=$(pwd)
mkdir -p ${WRAP_DIR} mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then if test -n "$GBUILD_CACHE_ENABLED"; then
export SOURCES_PATH=${GBUILD_COMMON_CACHE} export SOURCES_PATH=${GBUILD_COMMON_CACHE}
@ -96,7 +96,7 @@ script: |
export PATH=${WRAP_DIR}:${PATH} export PATH=${WRAP_DIR}:${PATH}
cd bitcoin cd bitcoin
BASEPREFIX=`pwd`/depends BASEPREFIX=$(pwd)/depends
# Build dependencies for each host # Build dependencies for each host
for i in $HOSTS; do for i in $HOSTS; do
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}" make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
@ -111,10 +111,10 @@ script: |
# Create the release tarball using (arbitrarily) the first host # Create the release tarball using (arbitrarily) the first host
./autogen.sh ./autogen.sh
CONFIG_SITE=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`/share/config.site ./configure --prefix=/ CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/
make dist make dist
SOURCEDIST=`echo bitcoin-*.tar.gz` SOURCEDIST=$(echo bitcoin-*.tar.gz)
DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'` DISTNAME=$(echo ${SOURCEDIST} | sed 's/.tar.*//')
# Correct tar file order # Correct tar file order
mkdir -p temp mkdir -p temp
pushd temp pushd temp
@ -131,7 +131,7 @@ script: |
export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH} export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
mkdir -p distsrc-${i} mkdir -p distsrc-${i}
cd distsrc-${i} cd distsrc-${i}
INSTALLPATH=`pwd`/installed/${DISTNAME} INSTALLPATH=$(pwd)/installed/${DISTNAME}
mkdir -p ${INSTALLPATH} mkdir -p ${INSTALLPATH}
tar --strip-components=1 -xf ../$SOURCEDIST tar --strip-components=1 -xf ../$SOURCEDIST

View File

@ -24,7 +24,6 @@ disabled=(
) )
disabled_gitian=( disabled_gitian=(
SC2001 # See if you can use ${variable//search/replace} instead. SC2001 # See if you can use ${variable//search/replace} instead.
SC2006 # Use $(...) notation instead of legacy backticked `...`.
SC2094 # Make sure not to read and write the same file in the same pipeline. SC2094 # Make sure not to read and write the same file in the same pipeline.
SC2129 # Consider using { cmd1; cmd2; } >> file instead of individual redirects. SC2129 # Consider using { cmd1; cmd2; } >> file instead of individual redirects.
SC2155 # Declare and assign separately to avoid masking return values. SC2155 # Declare and assign separately to avoid masking return values.