From 11829ec3d8e2af49df0288f96d7779ecbabb37da Mon Sep 17 00:00:00 2001 From: Adw8 Date: Fri, 25 Oct 2024 14:40:29 +0530 Subject: [PATCH 1/3] Update script to pay webapp deployer if needed --- packages/deployer/.env.example | 1 + packages/deployer/deploy-frontend.sh | 75 +++++++++++-------- .../application-deployment-request.yml | 19 +++-- .../deployer/records/application-record.yml | 4 +- .../public/.well-known/walletconnect.txt | 1 + packages/gql-client/package.json | 1 + packages/gql-client/src/types.ts | 1 - 7 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 packages/frontend/public/.well-known/walletconnect.txt 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 < Date: Fri, 25 Oct 2024 15:11:14 +0530 Subject: [PATCH 2/3] Add version --- packages/deployer/records/application-deployment-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/deployer/records/application-deployment-request.yml b/packages/deployer/records/application-deployment-request.yml index 55afff0e..88b6319b 100644 --- a/packages/deployer/records/application-deployment-request.yml +++ b/packages/deployer/records/application-deployment-request.yml @@ -1,8 +1,8 @@ record: type: ApplicationDeploymentRequest version: '1.0.0' - name: deploy-frontend@ - application: lrn:///applications/deploy-frontend@ + name: deploy-frontend@1.0.0 + application: lrn://vaasl/applications/deploy-frontend@1.0.0 dns: deploy config: env: -- 2.45.2 From 9a21ccefaca10854112b6f125749abee9606c244 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Fri, 25 Oct 2024 15:12:40 +0530 Subject: [PATCH 3/3] Update application-record --- packages/deployer/records/application-record.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/deployer/records/application-record.yml b/packages/deployer/records/application-record.yml index 435f2a94..9e23075f 100644 --- a/packages/deployer/records/application-record.yml +++ b/packages/deployer/records/application-record.yml @@ -5,4 +5,4 @@ record: repository: ["https://git.vdb.to/cerc-io/snowballtools-base"] app_type: webapp name: deploy-frontend - app_version: 0.0.0 + app_version: 1.0.0 -- 2.45.2