diff --git a/build-webapp.sh b/build-webapp.sh index d350c0d..03210bf 100755 --- a/build-webapp.sh +++ b/build-webapp.sh @@ -10,11 +10,17 @@ if [[ -d "$DEST_DIR" ]]; then fi cat > $PKG_DIR/.env </dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') + +if [ -z "$NEW_APPLICATION_VERSION" ] || [ "1" == "$NEW_APPLICATION_VERSION" ]; then + # Set application-record version if no previous records were found + NEW_APPLICATION_VERSION=0.0.1 +fi + +# Generate application-deployment-request.yml +cat > ./staging-records/application-deployment-request.yml < ./staging-records/application-record.yml <