Commit ccac8cdc authored by Sebastian Hönel's avatar Sebastian Hönel

Fix the builder.ts script according to Max Allan and upgrade version to v0.5.3

parent 8a687ac8
......@@ -26,10 +26,8 @@ var Builder = (function () {
reject('Composer not found.');
return;
}
var split = raw[0].split(': ')[1];
var splitPart = split.length < 2 ? split[0] : split[1];
composer = splitPart.substr(splitPart.lastIndexOf('/') + 1);
composerPath = splitPart.substr(0, splitPart.lastIndexOf('/'));
composer = raw[0].substr(raw[0].lastIndexOf('/') + 1);
composerPath = raw[0].substr(0, raw[0].lastIndexOf('/'));
}
ChildProc.execFile(composer, ['install', '-d', ("" + _this.projectRoot)], {
cwd: composerPath
......
/// <reference path="../typings/node/node.d.ts" />
/// <reference path="../typings/file-encryptor/file-encryptor.d.ts" />
/// <reference path="../typings/request/request.d.ts" />
import * as ChildProc from 'child_process';
export class Builder {
public constructor(private projectRoot: string) {
};
public buildPhp(): Promise<void> {
return new Promise<void>((resolve, reject) => {
public buildPhp(): Promise < void > {
return new Promise < void > ((resolve, reject) => {
let composer: string;
let composerPath: string;
......@@ -30,10 +28,8 @@ export class Builder {
return;
}
//composer: /usr/local/bin/composer
const split = raw[0].split(': ')[1];
const splitPart = split.length < 2 ? split[0] : split[1];
composer = splitPart.substr(splitPart.lastIndexOf('/') + 1);
composerPath = splitPart.substr(0, splitPart.lastIndexOf('/'));
composer = raw[0].substr(raw[0].lastIndexOf('/') + 1);
composerPath = raw[0].substr(0, raw[0].lastIndexOf('/'));
}
ChildProc.execFile(composer, ['install', '-d', `${this.projectRoot}`], {
......
{
"name": "igoterra-deploy-client",
"version": "0.5.2",
"version": "0.5.3",
"description": "This is a module for Node.js that can deploy a project to an instance of igtv3-deploy-server.",
"main": "index.js",
"repository": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment