diff --git a/packages/deployer/.env.example b/packages/deployer/.env.example index 907e9483..732dcfd7 100644 --- a/packages/deployer/.env.example +++ b/packages/deployer/.env.example @@ -1,2 +1,3 @@ REGISTRY_BOND_ID= DEPLOYER_LRN= +AUTHORITY= diff --git a/packages/deployer/deploy-frontend.sh b/packages/deployer/deploy-frontend.sh index c92df03f..6631f274 100755 --- a/packages/deployer/deploy-frontend.sh +++ b/packages/deployer/deploy-frontend.sh @@ -3,6 +3,7 @@ source .env echo "Using REGISTRY_BOND_ID: $REGISTRY_BOND_ID" echo "Using DEPLOYER_LRN: $DEPLOYER_LRN" +echo "Using AUTHORITY: $AUTHORITY" # Repository URL REPO_URL="https://git.vdb.to/cerc-io/snowballtools-base" @@ -21,40 +22,13 @@ CONFIG_FILE=config.yml # Reference: https://git.vdb.to/cerc-io/test-progressive-web-app/src/branch/main/scripts # Get latest version from registry and increment application-record version -NEW_APPLICATION_VERSION=$(yarn --silent laconic -c $CONFIG_FILE registry record list --type ApplicationRecord --all --name "snowballtools-base-frontend" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') +NEW_APPLICATION_VERSION=$(yarn --silent laconic -c $CONFIG_FILE registry record list --type ApplicationRecord --all --name "deploy-frontend" 2>/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 >./records/application-deployment-request.yml <./records/application-record.yml <./records/application-deployment-request.yml <