Settings hashing fix
gitea/docker-discover/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2021-01-15 18:19:30 +01:00
parent ba1cbd431d
commit c84fafb975
1 changed files with 3 additions and 2 deletions

View File

@ -64,10 +64,12 @@ async function updateProxy() {
}
services = services.sort(sortFn);
let configString = template({services, nodes, info});
// Cheking settings hash
let infoHash = shajs('sha256')
.update(JSON.stringify({services, nodes}))
.update(configString)
.digest('hex');
console.log('Settings hash:', infoHash);
@ -79,7 +81,6 @@ async function updateProxy() {
// Creating configuration file
let tmpConf = `${tmpDir}/config.cfg`;
let configString = template({services, nodes, info});
fs.writeFileSync(tmpConf, configString);
if (conf.debug) {