From 363b4c4439366299068f6078b57cd570ee42a989 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Thu, 23 Nov 2023 00:00:11 +0000 Subject: [PATCH] telackey/reverse (#4) Reviewed-on: https://git.vdb.to/cerc-io/test-progressive-web-app/pulls/4 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- scripts/publish-app-record.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish-app-record.sh b/scripts/publish-app-record.sh index 1f94a8b..81f1a93 100755 --- a/scripts/publish-app-record.sh +++ b/scripts/publish-app-record.sh @@ -26,7 +26,7 @@ services: fees: 200000aphoton EOF -next_ver=$(laconic -c $CONFIG_FILE cns record list --type ApplicationRecord --all --name "$rcd_name" 2>/dev/null | jq -s '.[] | sort_by(.createTime) | reverse' | jq -r '.[0].attributes.version' | awk -F. -v OFS=. '{$NF += 1 ; print}') +next_ver=$(laconic -c $CONFIG_FILE cns record list --type ApplicationRecord --all --name "$rcd_name" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$CERC_LACONIC_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') cat < "$RECORD_FILE" record: @@ -45,6 +45,6 @@ EOF cat $RECORD_FILE -laconic -c $CONFIG_FILE cns record publish --filename $RECORD_FILE --user-key "${CERC_LACONIC_USER_KEY:-$CICD_LACONIC_USER_KEY}" --bond-id ${CERC_LACONIC_BOND_ID:-$CICD_LACONIC_BOND_ID} +laconic -c $CONFIG_FILE cns record publish --filename $RECORD_FILE --user-key "${CERC_LACONIC_USER_KEY}" --bond-id ${CERC_LACONIC_BOND_ID} rm -f $RECORD_FILE $CONFIG_FILE