Skip to content

Commit

Permalink
Merge pull request #260 from hollaex/testnet
Browse files Browse the repository at this point in the history
HollaEx CLI v2.5.1 Release
  • Loading branch information
kycfeel authored Nov 11, 2022
2 parents fa1e446 + 35c6c9e commit e12590d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
6 changes: 3 additions & 3 deletions hollaex
Original file line number Diff line number Diff line change
Expand Up @@ -3000,9 +3000,6 @@ elif [[ "$1" == "start" ]]; then

fi




source $SCRIPTPATH/tools_generator.sh

for i in ${CONFIG_FILE_PATH[@]}; do
Expand All @@ -3026,6 +3023,9 @@ elif [[ "$1" == "start" ]]; then

load_config_variables;

#Validate the envs
essential_secret_validator;

if [[ ! "$IGNORE_COMPATIBILITY_CHECK" ]]; then

if [[ ! "$HOLLAEX_NETWORK_START" ]]; then
Expand Down
41 changes: 29 additions & 12 deletions tools_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ function generate_random_values() {

function update_random_values_to_config() {

GENERATE_VALUES_LIST=( "HOLLAEX_SECRET_SUPERVISOR_PASSWORD" "HOLLAEX_SECRET_SUPPORT_PASSWORD" "HOLLAEX_SECRET_KYC_PASSWORD" "HOLLAEX_SECRET_QUICK_TRADE_SECRET" "HOLLAEX_SECRET_SECRET" )
GENERATE_VALUES_LIST=( "HOLLAEX_SECRET_SECRET" )

for j in ${CONFIG_FILE_PATH[@]}; do

Expand All @@ -2073,20 +2073,9 @@ for j in ${CONFIG_FILE_PATH[@]}; do
grep -v $k $SECRET_CONFIG_FILE_PATH > temp && mv temp $SECRET_CONFIG_FILE_PATH
#echo $SECRET_CONFIG_FILE_PATH

# Using special form to generate both API_KEYS keys and secret
if [[ "$k" == "HOLLAEX_SECRET_SECRET" ]]; then

cat >> $SECRET_CONFIG_FILE_PATH <<EOL
$k=$(generate_random_values):$(generate_random_values)
EOL

else

cat >> $SECRET_CONFIG_FILE_PATH <<EOL
$k=$(generate_random_values)
EOL

fi

done

Expand Down Expand Up @@ -2323,6 +2312,8 @@ REACT_APP_LOGO_BLACK_PATH=${HOLLAEX_CONFIGMAP_LOGO_BLACK_PATH}
REACT_APP_EXCHANGE_NAME='${HOLLAEX_CONFIGMAP_API_NAME}'
REACT_APP_LAST_BUILD=$(date +"%Y-%m-%dT%H-%M-%S")
EOL

if [[ "$HOLLAEX_CONFIGMAP_API_HOST" == "$HOLLAEX_CONFIGMAP_DOMAIN/api" ]]; then
Expand Down Expand Up @@ -2375,6 +2366,8 @@ data:
REACT_APP_DEFAULT_COUNTRY: ${ENVIRONMENT_WEB_DEFAULT_COUNTRY}
REACT_APP_BASE_CURRENCY: usdt
REACT_APP_LAST_BUILD: $(date +"%Y-%m-%dT%H-%M-%S")
EOL
}
Expand Down Expand Up @@ -7751,4 +7744,28 @@ EOL

fi
done
}

function essential_secret_validator() {

echo "Checking the core enviornment variables' status"

VALIDATION_ENV_LIST=( "HOLLAEX_SECRET_DB_PASSWORD" "HOLLAEX_SECRET_SECRET" )

for i in ${VALIDATION_ENV_LIST[@]}; do

declare prefix_$i=${!i}
VERIFY_ITEM=prefix_$i

if [[ -z "${!VERIFY_ITEM}" ]]; then

echo "Error: Env ${VERIFY_ITEM} is not defined!"
exit 1;

fi

done

echo "All good!"

}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.5.1

0 comments on commit e12590d

Please sign in to comment.