telackey/reverse (#4)

Reviewed-on: cerc-io/test-progressive-web-app#4
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
This commit is contained in:
Thomas E Lackey 2023-11-23 00:00:11 +00:00 committed by Thomas E Lackey
parent 96300135b8
commit 363b4c4439

View File

@ -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 <<EOF | sed '/.*: ""$/d' > "$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