Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions release/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.cargo

# build dir
build

# build dependencies
ui
dna
syn-ui

# build generated
syn_dna_address

# runtime data
storage/**/*

# electron-packager folders
syn-*

# copied binaries
hc
lair-keystore*
holochain*

.DS_Store
**/.DS_Store

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
8 changes: 8 additions & 0 deletions release/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# syn-release

Steps required for making a new release:
1. `cd` into this `release` directory
1. Copy `holochain` and `lair-keystore` binaries to `bin` subfolder in this `release` folder adding the following build platform suffixes while doing so:
- Linux: `-linux` (`holochain-linux` and `lair-keystore-linux`).
- macOS: No suffix (`holochain` and `lair-keystore`).
1. From this `release` directory, run `sh release_build.sh` to build the ui and the electron package in one go
79 changes: 79 additions & 0 deletions release/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
const { spawnSync } = require('child_process');
//const path = require('path');
const { log } = require('./logger');

/**
* On windows, call `wsl wslpath` on filePath to convert it to a wsl compatible filepath usable within wsl
* @param filePath
* @returns {string|*}
*/
function wslPath(filePath) {
if (process.platform !== "win32") {
return filePath;
}
let fp = filePath.replace(/\\/g, "\\\\");
let wslparams = ["/c", "wsl", "wslpath", "-a", fp];
let { stdout, stderr, error } = spawnSync(
process.env.comspec,
wslparams,
{cwd: __dirname}
);
if (stderr) {
log('error', stderr.toString());
}
if (error) {
log('error', error.toString());
}
stdout = stdout? stdout.toString() : "";
log('debug',"CLI wslPath; got results: " + stdout);
fp = stdout.substring(0, stdout.length - 1); // remove 'return' char
return fp
}
module.exports.wslPath = wslPath;

/**
* Make sure there is no outstanding holochain process in wsl by calling `killall` command
*/
function killAllWsl(psname) {
if (process.platform !== "win32") {
return;
}
log('info', 'killAllWsl:' + psname);
let { stdout, stderr, error } = spawnSync(
process.env.comspec,
["/c", "wsl", "killall", psname],
{cwd: __dirname},
);
if (stdout) {
log('info', stdout.toString());
}
if (stderr) {
log('error', stderr.toString());
}
if (error) {
log('error', error.toString());
}
//log('info', 'killAllWsl:' + psname + ' - DONE');
}
module.exports.killAllWsl = killAllWsl;


// /**
// *
// */
// function executablePath() {
// let executable;
// if (process.platform === "win32") {
// return process.env.comspec;
// }
// if (process.platform === "darwin") {
// executable = "./hc-darwin"
// } else if (process.platform === "linux") {
// executable = "./hc-linux"
// } else {
// log('error', "unsupported platform: " + process.platform);
// return
// }
// return path.join(__dirname, executable)
// }
// module.exports.executablePath = executablePath;
Loading