From 159247c3a447cf9a3890bca20cc8feea91754775 Mon Sep 17 00:00:00 2001 From: mrlutik Date: Thu, 11 Apr 2024 19:24:07 +0200 Subject: [PATCH] feat(update_app_config): Update config and set an app.toml var * Fix streamers error * Set grpc in the app.toml to 0.0.0.0:9090 --- RELEASE.md | 4 +++- kira/configure.sh | 25 +++++++++++++++++-------- nvim | 0 scripts/version.sh | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 nvim diff --git a/RELEASE.md b/RELEASE.md index 367d7f11f..eec3bbd14 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,5 @@ Features: -* Update tools version +* Update app.toml configuration +* Add app.toml grpc setting + diff --git a/kira/configure.sh b/kira/configure.sh index a17830879..665a8cdba 100644 --- a/kira/configure.sh +++ b/kira/configure.sh @@ -57,6 +57,9 @@ globSet EXTERNAL_ADDRESS "$cfg_p2p_external_address" globSet EXTERNAL_DNS "$EXTERNAL_DNS" globSet EXTERNAL_PORT "$EXTERNAL_P2P_PORT" +#Set grpc listening address for app.toml +globSet app_grpc_address "0.0.0.0:9090" + echoInfo "INFO: Local Addr: $LOCAL_IP" echoInfo "INFO: Public Addr: $PUBLIC_IP" echoInfo "INFO: External Addr: $EXTERNAL_ADDRESS" @@ -281,19 +284,25 @@ for row in "${cfg_rows[@]}"; do done echoInfo "INFO: Updating APP file..." + getTomlVarNames $APP > /tmp/app_names.tmp + mapfile app_rows < /tmp/app_names.tmp + for row in "${app_rows[@]}"; do ( $(isNullOrWhitespaces $row) ) && continue - tag=$(echo $row | cut -d' ' -f1 | tr -d '\011\012\013\014\015\040\133\135' | xargs) - name=$(echo $row | cut -d' ' -f2 | tr -d '\011\012\013\014\015\040\133\135' | xargs) - val_target_1=$(echo "app_${tag}_${name}" | tr -d '\011\012\013\014\015\040\133\135' | xargs) - val_target_2=$(echo "$val_target_1" | sed -r 's/[-]+/_/g' | xargs) - val="${!val_target_2}" - [ -z "$val" ] && val=$(globGet "$val_target_1") + + tag=$(echo $row | cut -d' ' -f1 | tr -d '\\011\\012\\013\\014\\015\\040\\133\\135' | xargs) + name=$(echo $row | cut -d' ' -f2 | tr -d '\\011\\012\\013\\014\\015\\040\\133\\135' | xargs) + + val_target_1="app_${tag}_${name}" + val_target_2=$(echo "$val_target_1" | sed -r 's/\[-\]+/\_/g') + + val=$(globGet "$val_target_1") [ -z "$val" ] && val=$(globGet "$val_target_2") - if [ ! -z "$val" ] ; then - echoWarn "WARNING: Updating APP value: [$tag] $name -> '$val' " + + if [ ! -z "$val" ]; then + echoWarn "WARNING: Updating APP value: [$tag] $name -> '$val'" setTomlVar "[$tag]" "$name" "$val" $APP else echoInfo "INFO: APP value: [$tag] $name will NOT change, glob val was NOT found" diff --git a/nvim b/nvim deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/version.sh b/scripts/version.sh index 04c5c6731..9f8c31061 100644 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -echo "v0.12.23" +echo "v0.12.24"