Urgent correction of version v1.0.0-beta.14 due to crash issues when acting on the CDN.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-07-12 18:13:03 +02:00
parent aaff0ed4ea
commit 44631acfc6
27 changed files with 704 additions and 534 deletions

View File

@@ -5,6 +5,7 @@ const child_process = require('child_process');
const packageJson = require('../package.json');
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
function getAllFiles(dirPath, arrayOfFiles) {
const files = fs.readdirSync(dirPath);
@@ -51,11 +52,14 @@ router.get('/', async (req, res) => {
build_version: version,
node_version: process.version,
express_version: expressVersion,
build_sha: child_process.execSync('git rev-parse HEAD').toString().trim(),
build_sha: '',
os_type: os.type(),
os_release: os.release(),
};
const hash = crypto.createHash('md5');
hash.update(buildMetadata.build_version);
buildMetadata.build_sha = hash.digest('hex').substring(0, 32);
res.json(buildMetadata);
} catch (error) {