Skip to content

Commit

Permalink
Merge pull request #568 from KiraCore/feature/update_app_config
Browse files Browse the repository at this point in the history
feature/update_app_config -> release/v0.12.24
  • Loading branch information
MrLutik authored Apr 11, 2024
2 parents a2ddd50 + 159247c commit 754b3f2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
4 changes: 3 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Features:

* Update tools version
* Update app.toml configuration
* Add app.toml grpc setting

25 changes: 17 additions & 8 deletions kira/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Empty file removed nvim
Empty file.
2 changes: 1 addition & 1 deletion scripts/version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

echo "v0.12.23"
echo "v0.12.24"

0 comments on commit 754b3f2

Please sign in to comment.