Implement Build Number

This commit is contained in:
Jan-Otto Kröpke 2023-05-30 17:27:44 +02:00
parent eeecbfe469
commit 64095ea972
No known key found for this signature in database
1 changed files with 8 additions and 5 deletions

View File

@ -1,13 +1,16 @@
const fs = require('fs'); const fs = require('fs');
var packagejson = require('./lens/open-lens/package.json'); const packageJsonOpenLens = require('./lens/open-lens/package.json');
packagejson.build.publish = [{ packageJsonOpenLens.build.publish = [{
url: "https://github.com/MuhammedKalkan/OpenLens/releases/download/Latest", url: "https://github.com/MuhammedKalkan/OpenLens/releases/download/Latest",
provider: "generic" provider: "generic"
}]; }];
packagejson.build.win.artifactName = "OpenLens.Setup.${version}.${ext}"; packageJsonOpenLens.version = `${packageJsonOpenLens.version}+${process.env.BUILD_NUMBER}`;
packagejson.build.npmRebuild = true; packageJsonOpenLens.build.artifactName = "${productName}-${buildVersion}-${arch}-${os}.${ext}";
packageJsonOpenLens.build.linux.artifactName = packageJsonOpenLens.build.linux.artifactName.replace("${version}", "${buildVersion}");
packageJsonOpenLens.build.win.artifactName = "OpenLens.Setup.${buildVersion}.${ext}";
packageJsonOpenLens.build.npmRebuild = true;
fs.writeFileSync('./lens/open-lens/package.json', JSON.stringify(packagejson)); fs.writeFileSync('./lens/open-lens/package.json', JSON.stringify(packageJsonOpenLens, null, 2));