mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Lint hak scripts
This commit is contained in:
parent
5fc72e8f73
commit
fa3925194d
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const child_process = require('child_process');
|
const childProcess = require('child_process');
|
||||||
|
|
||||||
const mkdirp = require('mkdirp');
|
const mkdirp = require('mkdirp');
|
||||||
const fsExtra = require('fs-extra');
|
const fsExtra = require('fs-extra');
|
||||||
@ -28,7 +28,7 @@ module.exports = async function(hakEnv, moduleInfo) {
|
|||||||
await buildSqlCipherUnix(hakEnv, moduleInfo);
|
await buildSqlCipherUnix(hakEnv, moduleInfo);
|
||||||
}
|
}
|
||||||
await buildMatrixSeshat(hakEnv, moduleInfo);
|
await buildMatrixSeshat(hakEnv, moduleInfo);
|
||||||
}
|
};
|
||||||
|
|
||||||
async function buildOpenSslWin(hakEnv, moduleInfo) {
|
async function buildOpenSslWin(hakEnv, moduleInfo) {
|
||||||
const openSslDir = path.join(moduleInfo.moduleDotHakDir, 'openssl-1.1.1d');
|
const openSslDir = path.join(moduleInfo.moduleDotHakDir, 'openssl-1.1.1d');
|
||||||
@ -37,7 +37,7 @@ async function buildOpenSslWin(hakEnv, moduleInfo) {
|
|||||||
|
|
||||||
console.log("Building openssl in " + openSslDir);
|
console.log("Building openssl in " + openSslDir);
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'perl',
|
'perl',
|
||||||
[
|
[
|
||||||
'Configure',
|
'Configure',
|
||||||
@ -103,7 +103,7 @@ async function buildOpenSslWin(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'nmake',
|
'nmake',
|
||||||
['build_libs'],
|
['build_libs'],
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ async function buildOpenSslWin(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'nmake',
|
'nmake',
|
||||||
['install_dev'],
|
['install_dev'],
|
||||||
{
|
{
|
||||||
@ -138,7 +138,7 @@ async function buildSqlCipherWin(hakEnv, moduleInfo) {
|
|||||||
await mkdirp(buildDir);
|
await mkdirp(buildDir);
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'nmake',
|
'nmake',
|
||||||
['/f', path.join('..', 'Makefile.msc'), 'libsqlite3.lib', 'TOP=..'],
|
['/f', path.join('..', 'Makefile.msc'), 'libsqlite3.lib', 'TOP=..'],
|
||||||
{
|
{
|
||||||
@ -185,7 +185,7 @@ async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
path.join(sqlCipherDir, 'configure'),
|
path.join(sqlCipherDir, 'configure'),
|
||||||
args,
|
args,
|
||||||
{
|
{
|
||||||
@ -199,7 +199,7 @@ async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'make',
|
'make',
|
||||||
[],
|
[],
|
||||||
{
|
{
|
||||||
@ -213,7 +213,7 @@ async function buildSqlCipherUnix(hakEnv, moduleInfo) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'make',
|
'make',
|
||||||
['install'],
|
['install'],
|
||||||
{
|
{
|
||||||
@ -240,7 +240,7 @@ async function buildMatrixSeshat(hakEnv, moduleInfo) {
|
|||||||
|
|
||||||
console.log("Running neon with env", env);
|
console.log("Running neon with env", env);
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
path.join(moduleInfo.nodeModuleBinDir, 'neon' + (hakEnv.isWin() ? '.cmd' : '')),
|
path.join(moduleInfo.nodeModuleBinDir, 'neon' + (hakEnv.isWin() ? '.cmd' : '')),
|
||||||
['build', '--release'],
|
['build', '--release'],
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const child_process = require('child_process');
|
const childProcess = require('child_process');
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const fsProm = require('fs').promises;
|
const fsProm = require('fs').promises;
|
||||||
@ -28,7 +28,7 @@ module.exports = async function(hakEnv, moduleInfo) {
|
|||||||
if (hakEnv.isWin()) {
|
if (hakEnv.isWin()) {
|
||||||
getOpenSsl(hakEnv, moduleInfo);
|
getOpenSsl(hakEnv, moduleInfo);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
async function getSqlCipher(hakEnv, moduleInfo) {
|
async function getSqlCipher(hakEnv, moduleInfo) {
|
||||||
const sqlCipherDir = path.join(moduleInfo.moduleDotHakDir, 'sqlcipher-4.3.0');
|
const sqlCipherDir = path.join(moduleInfo.moduleDotHakDir, 'sqlcipher-4.3.0');
|
||||||
@ -73,7 +73,7 @@ async function getSqlCipher(hakEnv, moduleInfo) {
|
|||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const readStream = fs.createReadStream(patchFile);
|
const readStream = fs.createReadStream(patchFile);
|
||||||
|
|
||||||
const proc = child_process.spawn(
|
const proc = childProcess.spawn(
|
||||||
'patch',
|
'patch',
|
||||||
['-p1'],
|
['-p1'],
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"fetch": "yarn run mkdirs && node scripts/fetch-package.js",
|
"fetch": "yarn run mkdirs && node scripts/fetch-package.js",
|
||||||
"setversion": "node scripts/set-version.js",
|
"setversion": "node scripts/set-version.js",
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"lint": "eslint src/ scripts/",
|
"lint": "eslint src/ scripts/ hak/",
|
||||||
"build": "yarn run setversion && electron-builder",
|
"build": "yarn run setversion && electron-builder",
|
||||||
"in-docker": "scripts/in-docker.sh",
|
"in-docker": "scripts/in-docker.sh",
|
||||||
"docker:build": "yarn run in-docker yarn run build",
|
"docker:build": "yarn run in-docker yarn run build",
|
||||||
|
Loading…
Reference in New Issue
Block a user