From cfc746d55870e141c507c66a91c653b3e3fe15e5 Mon Sep 17 00:00:00 2001 From: Jakub Serafin Date: Thu, 7 Sep 2023 15:16:07 +0200 Subject: [PATCH] (core) fly.io version updated Summary: fly.io made some breaking changes between so we need to bump up version from 1.16 to 1.18. Also, volumes cannot have name in more than 30 characters so i've introducent trimming mechanism for volume names Test Plan: I've deployed preview with that settings and it went OK. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4033 --- .github/workflows/fly.yml | 4 ++-- buildtools/fly-deploy.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml index d069d9c1..5f7d10b8 100644 --- a/.github/workflows/fly.yml +++ b/.github/workflows/fly.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: superfly/flyctl-actions/setup-flyctl@master with: - version: 0.1.66 + version: 0.1.89 - id: fly_deploy run: | node buildtools/fly-deploy.js deploy @@ -59,6 +59,6 @@ jobs: - uses: actions/checkout@v3 - uses: superfly/flyctl-actions/setup-flyctl@master with: - version: 0.1.66 + version: 0.1.89 - id: fly_destroy run: node buildtools/fly-deploy.js destroy diff --git a/buildtools/fly-deploy.js b/buildtools/fly-deploy.js index 8df50687..ba115102 100644 --- a/buildtools/fly-deploy.js +++ b/buildtools/fly-deploy.js @@ -9,12 +9,12 @@ const org = "grist-labs"; const expirationSec = 30 * 24 * 60 * 60; // 30 days const getAppName = () => "grist-" + getBranchName().toLowerCase().replace(/[\W|_]+/g, '-'); -const getVolumeName = () => "grist_vol_" + getBranchName().toLowerCase().replace(/\W+/g, '_'); +const getVolumeName = () => ("gv_" + getBranchName().toLowerCase().replace(/\W+/g, '_')).substring(0, 30); const getBranchName = () => { if (!process.env.BRANCH_NAME) { console.log('Usage: Need BRANCH_NAME env var'); process.exit(1); } return process.env.BRANCH_NAME; -} +}; async function main() { if (process.argv[2] === 'deploy') {