Skip to content

Commit

Permalink
feat: staging release
Browse files Browse the repository at this point in the history
  • Loading branch information
mohandast52 committed Sep 26, 2024
1 parent 15760e0 commit 0f7bdd5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
40 changes: 18 additions & 22 deletions electron/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ const process = require('process');
const axios = require('axios');
const { spawnSync } = require('child_process');
const { logger } = require('./logger');
const { execSync} = require('child_process');
const { execSync } = require('child_process');
const { paths } = require('./constants');
const homedir = os.homedir();
/**
* current version of the pearl release
* - use "" (nothing as a suffix) for latest release candidate, for example "0.1.0rc26"
* - use "alpha" for alpha release, for example "0.1.0rc26-alpha"
*/
const OlasMiddlewareVersion = '0.1.0rc143';
const OlasMiddlewareVersion = '0.1.0rc145';

const path = require('path');
const { app } = require('electron');
Expand Down Expand Up @@ -55,18 +55,16 @@ const TendermintUrls = {
},
};


function execSyncExitCode(cmd) {
try {
execSync(cmd);
return 0;
}
catch (error) {
logger.electron(error.status); // Might be 127 in your example.
} catch (error) {
logger.electron(error.status); // Might be 127 in your example.
logger.electron(error.message); // Holds the message you typically want.
logger.electron(error.stderr.toString()); // Holds the stderr output. Use `.toString()`.
logger.electron(error.stdout.toString()); // Holds the stdout output. Use `.toString()`.
return error.status;
logger.electron(error.stderr.toString()); // Holds the stderr output. Use `.toString()`.
logger.electron(error.stdout.toString()); // Holds the stdout output. Use `.toString()`.
return error.status;
}
}

Expand Down Expand Up @@ -94,7 +92,6 @@ function runCmdUnix(command, options) {
logger.electron(`===== stderr ===== \n${output.stderr}`);
}


function runSudoUnix(command, options) {
let bin = getBinPath(command);
if (!bin) {
Expand Down Expand Up @@ -132,7 +129,7 @@ function isTendermintInstalledUnix() {
function isTendermintInstalledWindows() {
return true;
//always installed cause bundled in
return execSyncExitCode('tendermint --help') === 0;
return execSyncExitCode('tendermint --help') === 0;
}

async function downloadFile(url, dest) {
Expand Down Expand Up @@ -171,24 +168,23 @@ async function installTendermintWindows() {
logger.electron(`Installing tendermint binary`);
try {
execSync('tar -xvf tendermint.tar.gz');
} catch (error){
logger.electron(error.status); // Might be 127 in your example.
} catch (error) {
logger.electron(error.status); // Might be 127 in your example.
logger.electron(error.message); // Holds the message you typically want.
logger.electron(error.stderr.toString()); // Holds the stderr output. Use `.toString()`.
logger.electron(error.stdout.toString()); // Holds the stdout output. Use `.toString()`.
logger.electron(error.stderr.toString()); // Holds the stderr output. Use `.toString()`.
logger.electron(error.stdout.toString()); // Holds the stdout output. Use `.toString()`.
}

const bin_dir = homedir + "//AppData//Local//Microsoft//WindowsApps//"
const bin_dir = homedir + '//AppData//Local//Microsoft//WindowsApps//';
if (!Env.CI) {
if (!fs.existsSync(bin_dir)) {
fs.mkdirSync(bin_dir, {recursive: true});
fs.mkdirSync(bin_dir, { recursive: true });
}
fs.copyFileSync("tendermint.exe", bin_dir + "tendermint.exe");
fs.copyFileSync('tendermint.exe', bin_dir + 'tendermint.exe');
}
process.chdir(cwd);
}


async function installTendermintUnix() {
logger.electron(`Installing tendermint for ${os.platform()}-${process.arch}`);
const cwd = process.cwd();
Expand Down Expand Up @@ -259,14 +255,14 @@ async function setupUbuntu(ipcChannel) {
}
}



async function setupWindows(ipcChannel) {
logger.electron('Creating required directories');
await createDirectory(`${paths.dotOperateDirectory}`);
await createDirectory(`${paths.tempDir}`);

logger.electron('Checking tendermint installation: ' + isTendermintInstalledWindows());
logger.electron(
'Checking tendermint installation: ' + isTendermintInstalledWindows(),
);
if (!isTendermintInstalledWindows()) {
ipcChannel.send('response', 'Installing tendermint');
logger.electron('Installing tendermint');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
"download-binaries": "sh download_binaries.sh",
"build:pearl": "sh build_pearl.sh"
},
"version": "0.1.0-rc143"
"version": "0.1.0-rc145"
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "olas-operate-middleware"
version = "0.1.0-rc143"
version = "0.1.0-rc145"
description = ""
authors = ["David Vilela <[email protected]>", "Viraj Patel <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 0f7bdd5

Please sign in to comment.