Test code climate #1058

Closed
IGassmann wants to merge 48 commits from testCodeClimate into master
5 changed files with 15 additions and 24 deletions
Showing only changes of commit 2786f9bffe - Show all commits

View file

@ -34,7 +34,7 @@ script:
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
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
yarn release
fi

View file

@ -1,13 +1,11 @@
/* eslint-disable */
var https = require('https');
var path = require('path');
var fs = require('fs');
var packageJSON = require('../package.json');
var AdmZip = require('adm-zip');
var axios = require('axios');
var decompress = require('decompress');
const path = require('path');
const fs = require('fs');
const packageJSON = require('../package.json');
const axios = require('axios');
const decompress = require('decompress');
module.exports = function (context) {
module.exports = function(context) {
const daemonURLTemplate = packageJSON.lbrySettings.lbrynetDaemonUrlTemplate;
const daemonVersion = packageJSON.lbrySettings.lbrynetDaemonVersion;
let currentPlatform = context.platform.toString();
@ -18,8 +16,9 @@ module.exports = function (context) {
.replace(/OSNAME/g, currentPlatform);
const tmpZipPath = 'build/daemon.zip';
return new Promise((resolve) => {
axios.request({
return new Promise(resolve => {
axios
.request({
responseType: 'arraybuffer',
url: daemonURL,
method: 'get',
@ -27,17 +26,14 @@ module.exports = function (context) {
'Content-Type': 'application/zip',
},
})
.then((result) => {
.then(result => {
fs.writeFileSync(tmpZipPath, result.data);
return true;
})
.then(() => {
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(() => {
return resolve(true);

View file

@ -45,5 +45,5 @@
"perMachine": true
},
"beforeBuild": "build/downloadDaemon.js",
"artifactName": "${productName}_${version}_${arch}.${ext}"
"artifactName": "${productName}_${version}.${ext}"
}

View file

@ -1,6 +1,6 @@
{
"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.",
"homepage": "https://lbry.io/",
"bugs": {
@ -72,7 +72,6 @@
"y18n": "^4.0.0"
},
"devDependencies": {
"adm-zip": "^0.4.7",
"axios": "^0.17.1",
"babel-eslint": "^8.0.3",
"babel-plugin-module-resolver": "^3.0.0",

View file

@ -171,10 +171,6 @@ acorn@^5.0.0, acorn@^5.2.1:
version "5.2.1"
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:
version "4.1.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8"