Updating installers CDN URL

This commit is contained in:
sbenmoussati
2022-11-25 08:51:19 +01:00
committed by Salah Benmoussati
parent 9d2fbd56f7
commit 9e22b7e640
2 changed files with 6 additions and 6 deletions

View File

@@ -4,12 +4,12 @@ const crypto = require('crypto');
const yaml = require('js-yaml');
const INSTALLERS = 'installers/';
const INSTALLERS_URL = 'https://static.symphony.com/sda/';
function updateYamlFile(yamlFilePath) {
let doc = yaml.load(fs.readFileSync(yamlFilePath, 'utf-8'));
doc.files[0].url = INSTALLERS + doc.files[0].url;
doc.path = INSTALLERS + doc.path;
doc.files[0].url = INSTALLERS_URL + doc.files[0].url;
doc.path = INSTALLERS_URL + doc.path;
fs.writeFileSync(yamlFilePath, yaml.dump(doc, { lineWidth: -1 }));
}

View File

@@ -4,13 +4,13 @@ const crypto = require('crypto');
const yaml = require('js-yaml');
const INSTALLERS = 'installers/';
const INSTALLERS_URL = 'https://static.symphony.com/sda/';
function updateYamlFile(yamlFilePath, installerHash) {
let doc = yaml.load(fs.readFileSync(yamlFilePath, 'utf-8'));
doc.files[0].url = INSTALLERS + doc.files[0].url;
doc.files[0].url = INSTALLERS_URL + doc.files[0].url;
doc.files[0].sha512 = installerHash;
doc.path = INSTALLERS + doc.path;
doc.path = INSTALLERS_URL + doc.path;
delete doc.sha512;
doc.sha512 = installerHash;
fs.writeFileSync(yamlFilePath, yaml.dump(doc, { lineWidth: -1 }));