Test code climate #1058
5 changed files with 15 additions and 24 deletions
|
@ -34,7 +34,7 @@ script:
|
||||||
-v ~/.cache/electron:/root/.cache/electron \
|
-v ~/.cache/electron:/root/.cache/electron \
|
||||||
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
|
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
|
||||||
electronuserland/builder:wine \
|
electronuserland/builder:wine \
|
||||||
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win"
|
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux && yarn release --win"
|
||||||
else
|
else
|
||||||
yarn release
|
yarn release
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
var https = require('https');
|
const path = require('path');
|
||||||
var path = require('path');
|
const fs = require('fs');
|
||||||
var fs = require('fs');
|
const packageJSON = require('../package.json');
|
||||||
var packageJSON = require('../package.json');
|
const axios = require('axios');
|
||||||
var AdmZip = require('adm-zip');
|
const decompress = require('decompress');
|
||||||
var axios = require('axios');
|
|
||||||
var decompress = require('decompress');
|
|
||||||
|
|
||||||
module.exports = function (context) {
|
module.exports = function(context) {
|
||||||
const daemonURLTemplate = packageJSON.lbrySettings.lbrynetDaemonUrlTemplate;
|
const daemonURLTemplate = packageJSON.lbrySettings.lbrynetDaemonUrlTemplate;
|
||||||
const daemonVersion = packageJSON.lbrySettings.lbrynetDaemonVersion;
|
const daemonVersion = packageJSON.lbrySettings.lbrynetDaemonVersion;
|
||||||
let currentPlatform = context.platform.toString();
|
let currentPlatform = context.platform.toString();
|
||||||
|
@ -18,8 +16,9 @@ module.exports = function (context) {
|
||||||
.replace(/OSNAME/g, currentPlatform);
|
.replace(/OSNAME/g, currentPlatform);
|
||||||
const tmpZipPath = 'build/daemon.zip';
|
const tmpZipPath = 'build/daemon.zip';
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise(resolve => {
|
||||||
axios.request({
|
axios
|
||||||
|
.request({
|
||||||
responseType: 'arraybuffer',
|
responseType: 'arraybuffer',
|
||||||
url: daemonURL,
|
url: daemonURL,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -27,17 +26,14 @@ module.exports = function (context) {
|
||||||
'Content-Type': 'application/zip',
|
'Content-Type': 'application/zip',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then(result => {
|
||||||
fs.writeFileSync(tmpZipPath, result.data);
|
fs.writeFileSync(tmpZipPath, result.data);
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return decompress(tmpZipPath, 'static/daemon', {
|
return decompress(tmpZipPath, 'static/daemon', {
|
||||||
filter: file => path.basename(file.path) === 'lbrynet-daemon'
|
filter: file => path.basename(file.path) === 'lbrynet-daemon',
|
||||||
});
|
});
|
||||||
// const zip = new AdmZip(tmpZipPath);
|
|
||||||
// zip.extractEntryTo('lbrynet-daemon', 'static/daemon', false, true);
|
|
||||||
return true;
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return resolve(true);
|
return resolve(true);
|
||||||
|
|
|
@ -45,5 +45,5 @@
|
||||||
"perMachine": true
|
"perMachine": true
|
||||||
},
|
},
|
||||||
"beforeBuild": "build/downloadDaemon.js",
|
"beforeBuild": "build/downloadDaemon.js",
|
||||||
"artifactName": "${productName}_${version}_${arch}.${ext}"
|
"artifactName": "${productName}_${version}.${ext}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "lbry-app",
|
"name": "lbry-app",
|
||||||
"version": "0.21.0",
|
"version": "0.22.0",
|
||||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||||
"homepage": "https://lbry.io/",
|
"homepage": "https://lbry.io/",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -72,7 +72,6 @@
|
||||||
"y18n": "^4.0.0"
|
"y18n": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"adm-zip": "^0.4.7",
|
|
||||||
"axios": "^0.17.1",
|
"axios": "^0.17.1",
|
||||||
"babel-eslint": "^8.0.3",
|
"babel-eslint": "^8.0.3",
|
||||||
"babel-plugin-module-resolver": "^3.0.0",
|
"babel-plugin-module-resolver": "^3.0.0",
|
||||||
|
|
|
@ -171,10 +171,6 @@ acorn@^5.0.0, acorn@^5.2.1:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
|
||||||
|
|
||||||
adm-zip@^0.4.7:
|
|
||||||
version "0.4.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1"
|
|
||||||
|
|
||||||
agent-base@4, agent-base@^4.1.0:
|
agent-base@4, agent-base@^4.1.0:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8"
|
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8"
|
||||||
|
|
Loading…
Reference in a new issue