Fix some issues detected bu Sonarqube.

pull/90/head
Dave Page 2022-08-10 10:22:06 +01:00
parent 923f2fc7c4
commit 233652c3f1
4 changed files with 9 additions and 14 deletions

View File

@ -4,7 +4,6 @@ _setup_env() {
APP_REVISION=`grep "^APP_REVISION" ${FUNCS_DIR}/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_NAME=`grep "^APP_NAME" ${FUNCS_DIR}/web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
APP_SUFFIX=`grep "^APP_SUFFIX" ${FUNCS_DIR}/web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
if [ ! -z ${APP_SUFFIX} ]; then
APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
@ -402,7 +401,6 @@ _notarize_pkg() {
fi
# Notarize the package. Try three times, to allow for upload issues
cmd_status=0
for i in {1..3}; do
echo "Uploading DMG for notarisation (attempt ${i} of 3)..."
STATUS=$(xcrun altool --notarize-app \

View File

@ -8,33 +8,33 @@ set -e -E
# Debugging shizz
trap 'ERRCODE=$? && if [ ${ERRCODE} -ne 0 ]; then echo "The command \"${BASH_COMMAND}\" failed in \"${FUNCNAME}\" with exit code ${ERRCODE}."; fi' EXIT
SCRIPT_DIR=$(cd `dirname $0` && pwd)
SOURCE_DIR=$(realpath ${SCRIPT_DIR}/../..)
BUILD_ROOT=$(realpath ${SCRIPT_DIR}/../..)/mac-build
TEMP_DIR=$(realpath ${SCRIPT_DIR}/../..)/mac-temp
DIST_ROOT=$(realpath ${SCRIPT_DIR}/../..)/dist
export SCRIPT_DIR=$(cd `dirname $0` && pwd)
export SOURCE_DIR=$(realpath ${SCRIPT_DIR}/../..)
export BUILD_ROOT=$(realpath ${SCRIPT_DIR}/../..)/mac-build
export TEMP_DIR=$(realpath ${SCRIPT_DIR}/../..)/mac-temp
export DIST_ROOT=$(realpath ${SCRIPT_DIR}/../..)/dist
CODESIGN=1
export CODESIGN=1
if [ ! -f ${SCRIPT_DIR}/codesign.conf ]; then
echo
echo "******************************************************************"
echo "* pkg/mac/codesign.conf not found. NOT signing the binaries."
echo "******************************************************************"
echo
CODESIGN=0
export CODESIGN=0
sleep 2
else
source ${SCRIPT_DIR}/codesign.conf
fi
NOTARIZE=1
export NOTARIZE=1
if [ ! -f ${SCRIPT_DIR}/notarization.conf ]; then
echo
echo "******************************************************************"
echo "* pkg/mac/notarization.conf not found. NOT notarizing the package."
echo "******************************************************************"
echo
NOTARIZE=0
export NOTARIZE=0
sleep 2
else
source ${SCRIPT_DIR}/notarization.conf

View File

@ -25,12 +25,10 @@ APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
if [ ! -z ${APP_SUFFIX} ]; then
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
fi
TARBALL_NAME=`echo ${APP_NAME}-${APP_LONG_VERSION} | sed 's/ //g' | awk '{print tolower($0)}'`
# Output basic details to show we're working
echo Building tarballs for ${APP_NAME} version ${APP_LONG_VERSION}...

View File

@ -25,7 +25,6 @@ APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
if [ ! -z ${APP_SUFFIX} ]; then
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}