Skip to content

Commit

Permalink
chore(deploy): remove old deployment tool
Browse files Browse the repository at this point in the history
Closes #1488
  • Loading branch information
barmac committed Sep 24, 2019
1 parent 8f83445 commit 59f2283
Show file tree
Hide file tree
Showing 24 changed files with 7 additions and 2,339 deletions.
178 changes: 0 additions & 178 deletions app/lib/deployer.js

This file was deleted.

44 changes: 5 additions & 39 deletions app/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const {

const path = require('path');

const fetch = require('node-fetch');
const fs = require('fs');
const FormData = require('form-data');

/**
* Report crashes.
*
Expand All @@ -31,7 +27,6 @@ const FormData = require('form-data');

const Cli = require('./cli');
const Config = require('./config');
const Deployer = require('./deployer');
const Dialog = require('./dialog');
const Flags = require('./flags');
const Log = require('./log');
Expand Down Expand Up @@ -67,7 +62,6 @@ const {

const {
config,
deployer,
dialog,
files,
flags,
Expand Down Expand Up @@ -168,11 +162,6 @@ renderer.on('dialog:show', async function(options, done) {
done(null, response);
});

// deploying //////////
// TODO: remove and add as plugin instead

renderer.on('deploy', handleDeployment);

// filesystem //////////

renderer.on('file:read', function(filePath, options = {}, done) {
Expand Down Expand Up @@ -460,21 +449,6 @@ app.on('ready', function() {
});


function handleDeployment(data, done) {
const { endpointUrl } = data;

deployer.deploy(endpointUrl, data, function(error, result) {

if (error) {
log.error('failed to deploy', error);

return done(error);
}

done(null, result);
});
}

function bootstrapLogging() {

let logPath;
Expand Down Expand Up @@ -531,35 +505,28 @@ function bootstrap() {
userPath
});

// (2) deployer
const deployer = new Deployer({
fetch,
FormData,
fs
});

// (3) flags
// (2) flags
const flags = new Flags({
paths: resourcesPaths,
overrides: flagOverrides
});

// (4) menu
// (3) menu
const menu = new Menu({
platform
});

// (5) dialog
// (4) dialog
const dialog = new Dialog({
config,
electronDialog,
userDesktopPath
});

// (6) workspace
// (5) workspace
new Workspace(config);

// (7) plugins
// (6) plugins
const pluginsDisabled = flags.get('disable-plugins');

let paths;
Expand All @@ -582,7 +549,6 @@ function bootstrap() {

return {
config,
deployer,
dialog,
files,
flags,
Expand Down
20 changes: 0 additions & 20 deletions app/test/helper/mock/fetch.js

This file was deleted.

19 changes: 0 additions & 19 deletions app/test/helper/mock/form-data.js

This file was deleted.

13 changes: 0 additions & 13 deletions app/test/helper/mock/fs.js

This file was deleted.

Loading

0 comments on commit 59f2283

Please sign in to comment.