Fix some issues detected bu Sonarqube.
parent
923f2fc7c4
commit
233652c3f1
|
@ -4,7 +4,6 @@ _setup_env() {
|
||||||
APP_REVISION=`grep "^APP_REVISION" ${FUNCS_DIR}/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
|
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_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_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"`
|
APP_SUFFIX=`grep "^APP_SUFFIX" ${FUNCS_DIR}/web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
|
||||||
if [ ! -z ${APP_SUFFIX} ]; then
|
if [ ! -z ${APP_SUFFIX} ]; then
|
||||||
APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
||||||
|
@ -402,7 +401,6 @@ _notarize_pkg() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Notarize the package. Try three times, to allow for upload issues
|
# Notarize the package. Try three times, to allow for upload issues
|
||||||
cmd_status=0
|
|
||||||
for i in {1..3}; do
|
for i in {1..3}; do
|
||||||
echo "Uploading DMG for notarisation (attempt ${i} of 3)..."
|
echo "Uploading DMG for notarisation (attempt ${i} of 3)..."
|
||||||
STATUS=$(xcrun altool --notarize-app \
|
STATUS=$(xcrun altool --notarize-app \
|
||||||
|
|
|
@ -8,33 +8,33 @@ set -e -E
|
||||||
# Debugging shizz
|
# Debugging shizz
|
||||||
trap 'ERRCODE=$? && if [ ${ERRCODE} -ne 0 ]; then echo "The command \"${BASH_COMMAND}\" failed in \"${FUNCNAME}\" with exit code ${ERRCODE}."; fi' EXIT
|
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)
|
export SCRIPT_DIR=$(cd `dirname $0` && pwd)
|
||||||
SOURCE_DIR=$(realpath ${SCRIPT_DIR}/../..)
|
export SOURCE_DIR=$(realpath ${SCRIPT_DIR}/../..)
|
||||||
BUILD_ROOT=$(realpath ${SCRIPT_DIR}/../..)/mac-build
|
export BUILD_ROOT=$(realpath ${SCRIPT_DIR}/../..)/mac-build
|
||||||
TEMP_DIR=$(realpath ${SCRIPT_DIR}/../..)/mac-temp
|
export TEMP_DIR=$(realpath ${SCRIPT_DIR}/../..)/mac-temp
|
||||||
DIST_ROOT=$(realpath ${SCRIPT_DIR}/../..)/dist
|
export DIST_ROOT=$(realpath ${SCRIPT_DIR}/../..)/dist
|
||||||
|
|
||||||
CODESIGN=1
|
export CODESIGN=1
|
||||||
if [ ! -f ${SCRIPT_DIR}/codesign.conf ]; then
|
if [ ! -f ${SCRIPT_DIR}/codesign.conf ]; then
|
||||||
echo
|
echo
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo "* pkg/mac/codesign.conf not found. NOT signing the binaries."
|
echo "* pkg/mac/codesign.conf not found. NOT signing the binaries."
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo
|
echo
|
||||||
CODESIGN=0
|
export CODESIGN=0
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
source ${SCRIPT_DIR}/codesign.conf
|
source ${SCRIPT_DIR}/codesign.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NOTARIZE=1
|
export NOTARIZE=1
|
||||||
if [ ! -f ${SCRIPT_DIR}/notarization.conf ]; then
|
if [ ! -f ${SCRIPT_DIR}/notarization.conf ]; then
|
||||||
echo
|
echo
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo "* pkg/mac/notarization.conf not found. NOT notarizing the package."
|
echo "* pkg/mac/notarization.conf not found. NOT notarizing the package."
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo
|
echo
|
||||||
NOTARIZE=0
|
export NOTARIZE=0
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
source ${SCRIPT_DIR}/notarization.conf
|
source ${SCRIPT_DIR}/notarization.conf
|
||||||
|
|
|
@ -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_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_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
|
||||||
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
|
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"`
|
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
|
||||||
if [ ! -z ${APP_SUFFIX} ]; then
|
if [ ! -z ${APP_SUFFIX} ]; then
|
||||||
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
||||||
fi
|
fi
|
||||||
TARBALL_NAME=`echo ${APP_NAME}-${APP_LONG_VERSION} | sed 's/ //g' | awk '{print tolower($0)}'`
|
|
||||||
|
|
||||||
# Output basic details to show we're working
|
# Output basic details to show we're working
|
||||||
echo Building tarballs for ${APP_NAME} version ${APP_LONG_VERSION}...
|
echo Building tarballs for ${APP_NAME} version ${APP_LONG_VERSION}...
|
||||||
|
|
|
@ -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_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_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //'`
|
||||||
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
|
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"`
|
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
|
||||||
if [ ! -z ${APP_SUFFIX} ]; then
|
if [ ! -z ${APP_SUFFIX} ]; then
|
||||||
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
export APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
||||||
|
|
Loading…
Reference in New Issue