diff --git a/packages/deployer/config.yml b/packages/deployer/config.yml index 2c6410df..f65a3bfc 100644 --- a/packages/deployer/config.yml +++ b/packages/deployer/config.yml @@ -3,7 +3,7 @@ services: restEndpoint: http://console.laconic.com:1317 gqlEndpoint: http://console.laconic.com:9473/api chainId: laconic_9000-1 - gas: 1000000 + gas: 1200000 fees: 200000aphoton userKey: 0524fc22ea0a12e6c5cc4cfe08e73c95dffd0ab5ed72a59f459ed33134fa3b16 bondId: 8fcf44b2f326b4b63ac57547777f1c78b7d494e5966e508f09001af53cb440ac diff --git a/packages/deployer/deploy-frontend.sh b/packages/deployer/deploy-frontend.sh index 1e56f47a..3bff6698 100755 --- a/packages/deployer/deploy-frontend.sh +++ b/packages/deployer/deploy-frontend.sh @@ -1,11 +1,71 @@ #!/bin/bash +# Repository URL +REPO_URL="https://git.vdb.to/cerc-io/snowballtools-base" + +# Get the latest commit hash from the repository +LATEST_HASH=$(git ls-remote $REPO_URL HEAD | awk '{print $1}') + +# Extract version from ../frontend/package.json +PACKAGE_VERSION=$(jq -r '.version' ../frontend/package.json) + +# Current date and time for note +CURRENT_DATE_TIME=$(date -u) + +# Increment application-record version +APPLICATION_RECORD_FILE="./records/application-record.yml" +if [ -f "$APPLICATION_RECORD_FILE" ]; then + # Extract current version and increment it + CURRENT_VERSION=$(grep 'version:' $APPLICATION_RECORD_FILE | head -1 | awk '{print $2}') + IFS='.' read -ra ADDR <<< "$CURRENT_VERSION" + VERSION_NUMBER=${ADDR[2]} + NEW_VERSION_NUMBER=$((VERSION_NUMBER + 1)) + NEW_APPLICATION_VERSION="${ADDR[0]}.${ADDR[1]}.$NEW_VERSION_NUMBER" +else + # If file does not exist, start from version 0.0.1 + NEW_APPLICATION_VERSION="0.0.1" +fi + +# Generate application-deployment-request.yml +cat > ./records/application-deployment-request.yml < ./records/application-record.yml <