Skip to content

Commit

Permalink
Update update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
b17k0 authored May 30, 2023
1 parent a4a1599 commit 247c7da
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions update.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
const fs = require('fs');

var packagejson = require('./lens/packages/open-lens/package.json');
var packagejson = require('./lens/open-lens/package.json');

packagejson.build.publish = [{
url: "https://github.com/beliys/OpenLens/releases/download/Latest",
url: "https://github.com/MuhammedKalkan/OpenLens/releases/download/Latest",
provider: "generic"
}];

packagejson.build.win.artifactName = "OpenLens.Setup.${version}.${ext}";
packagejson.build.npmRebuild = true;

if (process.platform != "win32") {
// build both x86_64 and arm64 for Linux and Darwin
packagejson.scripts['build:app'] = "electron-builder --publish onTag --x64 --arm64";
}

fs.writeFileSync('./lens/packages/open-lens/package.json', JSON.stringify(packagejson));


let npmrc = fs.readFileSync('./lens/.npmrc','utf-8');
npmrc = npmrc.replace("disturl \"","disturl = \"")
npmrc = npmrc.replace("target \"","target = \"")
npmrc = npmrc.replace("runtime \"","runtime = \"")
fs.writeFileSync('./lens/.npmrc',npmrc)
fs.writeFileSync('./lens/open-lens/package.json', JSON.stringify(packagejson));

0 comments on commit 247c7da

Please sign in to comment.