From 8041bc322c9836d24036188e179accaf86be7c2b Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Wed, 6 Dec 2023 16:44:29 -0600 Subject: [PATCH] Fix next_ver. --- scripts/publish-app-record.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/publish-app-record.sh b/scripts/publish-app-record.sh index 81f1a93..ee6ace6 100755 --- a/scripts/publish-app-record.sh +++ b/scripts/publish-app-record.sh @@ -28,10 +28,14 @@ EOF 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}') +if [ -z "$next_ver" ] || [ "1" == "$next_ver" ]; then + next_ver=0.0.1 +fi + cat < "$RECORD_FILE" record: type: ApplicationRecord - version: ${next_ver:-0.0.1} + version: ${next_ver} name: "$rcd_name" description: "$rcd_desc" homepage: "$rcd_homepage"