script: Enable SC2155 rule for Gitian scripts
Also pwd command is replaced with $PWD variable everywhere for consistency. (cherry picked from commit bitcoin/bitcoin@61bb21b418)
This commit is contained in:
parent
fa3abe8819
commit
f620206f03
|
@ -47,7 +47,7 @@ script: |
|
||||||
export GZIP="-9n"
|
export GZIP="-9n"
|
||||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||||
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: |
|
||||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||||
|
|
||||||
cd zcash
|
cd zcash
|
||||||
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}"
|
||||||
|
@ -116,7 +116,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
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ files:
|
||||||
script: |
|
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
|
||||||
|
|
|
@ -36,7 +36,7 @@ script: |
|
||||||
export GZIP="-9n"
|
export GZIP="-9n"
|
||||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||||
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}
|
||||||
|
@ -77,7 +77,7 @@ script: |
|
||||||
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
|
||||||
|
|
||||||
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}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
|
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
|
||||||
|
@ -112,7 +112,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
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ files:
|
||||||
- "osslsigncode-Backports-to-1.7.1.patch"
|
- "osslsigncode-Backports-to-1.7.1.patch"
|
||||||
- "bitcoin-win-unsigned.tar.gz"
|
- "bitcoin-win-unsigned.tar.gz"
|
||||||
script: |
|
script: |
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ script: |
|
||||||
export GZIP="-9n"
|
export GZIP="-9n"
|
||||||
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
|
||||||
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}
|
||||||
|
@ -101,7 +101,7 @@ script: |
|
||||||
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
create_per-host_linker_wrapper "2000-01-01 12:00:00"
|
||||||
|
|
||||||
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}"
|
||||||
|
@ -134,7 +134,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
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ disabled_gitian=(
|
||||||
SC2043 # This loop will only ever run once for a constant value. Did you perhaps mean to loop over dir/*, $var or $(cmd)?
|
SC2043 # This loop will only ever run once for a constant value. Did you perhaps mean to loop over dir/*, $var or $(cmd)?
|
||||||
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.
|
|
||||||
SC2164 # Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
|
SC2164 # Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
|
||||||
SC2230 # which is non-standard. Use builtin 'command -v' instead.
|
SC2230 # which is non-standard. Use builtin 'command -v' instead.
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue