(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
This commit is contained in:
Jakub Serafin 2023-09-07 15:16:07 +02:00
parent 4ead16176f
commit cfc746d558
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master - uses: superfly/flyctl-actions/setup-flyctl@master
with: with:
version: 0.1.66 version: 0.1.89
- id: fly_deploy - id: fly_deploy
run: | run: |
node buildtools/fly-deploy.js deploy node buildtools/fly-deploy.js deploy
@ -59,6 +59,6 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master - uses: superfly/flyctl-actions/setup-flyctl@master
with: with:
version: 0.1.66 version: 0.1.89
- id: fly_destroy - id: fly_destroy
run: node buildtools/fly-deploy.js destroy run: node buildtools/fly-deploy.js destroy

View File

@ -9,12 +9,12 @@ const org = "grist-labs";
const expirationSec = 30 * 24 * 60 * 60; // 30 days const expirationSec = 30 * 24 * 60 * 60; // 30 days
const getAppName = () => "grist-" + getBranchName().toLowerCase().replace(/[\W|_]+/g, '-'); 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 = () => { const getBranchName = () => {
if (!process.env.BRANCH_NAME) { console.log('Usage: Need BRANCH_NAME env var'); process.exit(1); } if (!process.env.BRANCH_NAME) { console.log('Usage: Need BRANCH_NAME env var'); process.exit(1); }
return process.env.BRANCH_NAME; return process.env.BRANCH_NAME;
} };
async function main() { async function main() {
if (process.argv[2] === 'deploy') { if (process.argv[2] === 'deploy') {