Skip to content

Commit

Permalink
packeger
Browse files Browse the repository at this point in the history
  • Loading branch information
anaval corebridge committed Jul 4, 2020
1 parent e577a88 commit be857e0
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,6 +13,7 @@
/build
/build-desktop
/icediff-win32-x64
/dotnet-packager-win32-x64
settings.json
# misc
.DS_Store
Expand Down
15 changes: 10 additions & 5 deletions desktop/main.ts
@@ -1,26 +1,31 @@
import { app, BrowserWindow } from "electron";
import * as path from "path";

const isProd = process.env.NODE_ENV === 'production';
let mainWindow: Electron.BrowserWindow | null;

function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
height: 600,
webPreferences: {
devTools: true,
devTools: !isProd,
preload: path.join(__dirname, "preload.js"),
nodeIntegration: true
},
width: 1000,
});

isProd && mainWindow.removeMenu();

// and load the index.html of the app.
//mainWindow.loadFile(path.join(__dirname, "../build/index.html"));
mainWindow.loadURL("http://localhost:3000");
if(isProd){
mainWindow.loadFile(path.join(__dirname, "../build/index.html"));
}else{
mainWindow.loadURL("http://localhost:3000");
}

// Open the DevTools.
mainWindow.webContents.openDevTools();
mainWindow.webContents.toggleDevTools();

// Emitted when the window is closed.
mainWindow.on("closed", () => {
Expand Down
10 changes: 7 additions & 3 deletions external-scripts/publish-all.ts
Expand Up @@ -50,8 +50,11 @@ function packProject(proj:IProjectInfo){
function pushPackage(nupkg:string, proj:IProjectInfo){
const cwd = path.dirname(proj.path);
const outPutDir = path.join(cwd, outputPath);

const push = execSync(`dotnet nuget push ${nupkg} --skip-duplicate -k ${settings.nugetKey} -s ${settings.nugetSource}`,{
let cmd = `dotnet nuget push ${nupkg} --skip-duplicate `;
cmd+= `-k ${settings.nugetKey} `;
cmd+= `-s ${settings.nugetSource} `;
cmd+= `-ss ${settings.nugetSource.replace('.nupkg', '.symbols.nupkg')} `;
const push = execSync(cmd,{
maxBuffer,
cwd: outPutDir
});
Expand All @@ -69,7 +72,8 @@ function installToParents(nupkg:string, child:IProjectInfo){
for (const parent of parents) {
console.log(`Installing ${child.name} to ${parent.name}`)
const cwd = path.dirname(parent.path);
const install = execSync(`dotnet add package ${child.name} -v ${newChildVersion} -s ${settings.nugetAuthSource}`,{
const install = execSync(`dotnet add package ${child.name} -v ${newChildVersion} -s '${settings.nugetAuthSource}'`,{
//const install = execSync(`nuget install ${child.name} -Version ${newChildVersion}`,{
maxBuffer,
cwd
});
Expand Down

0 comments on commit be857e0

Please sign in to comment.