Files
GDevelop/newIDE/web-app/scripts/deploy-GDJS-Runtime.js
Florian Rival e14215c679 Make GDJS runtime of the deployed web-app to use the exact commit hash
This avoids issues when deploying again the same version number

Don't show in changelog
2025-10-08 00:51:34 +02:00

32 lines
993 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const shell = require('shelljs');
const path = require('path');
let versionMetadata = null;
try {
versionMetadata = require('../../app/src/Version/VersionMetadata');
} catch (e) {
shell.echo(
'❌ Unable to find VersionMetadata.js in newIDE/app/src/Version - have you run npm install?'
);
shell.exit(1);
}
// The path containing GDJS Runtime *and* extensions
const gdjsFolder = path.join(__dirname, '../../app/resources/GDJS');
const destination = `s3://resources.gdevelop-app.com/GDJS-${versionMetadata.versionWithHash}`;
shell.echo('️ Uploading GDJS Runtime (with extensions) to resources.gdevelop-app.com...');
const output = shell.exec(
`aws s3 sync ${gdjsFolder} ${destination} --acl public-read`
);
if (output.code !== 0) {
shell.echo(
'❌ Unable to upload GDJS Runtime (with extensions) to resources.gdevelop-app.com. Error is:'
);
shell.echo(output.stdout);
shell.echo(output.stderr);
shell.exit(output.code);
}
shell.echo('✅ Upload finished');