mirror of
https://github.com/Febbweiss/ProjectDeployer.git
synced 2026-03-04 22:25:38 +00:00
Fix: installation / launch commands workflow
This commit is contained in:
@@ -59,9 +59,11 @@ CommandRunner = {
|
|||||||
if( bundle.project.commands ) {
|
if( bundle.project.commands ) {
|
||||||
bundle.script = bundle.project.commands.split('\n');
|
bundle.script = bundle.project.commands.split('\n');
|
||||||
CommandRunner.commands(bundle, callback);
|
CommandRunner.commands(bundle, callback);
|
||||||
|
} else if( bundle.project.run ) {
|
||||||
|
CommandRunner.launch(bundle, callback);
|
||||||
} else if( callback ) {
|
} else if( callback ) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
} else if( callback ) {
|
} else if( callback ) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@@ -90,8 +92,6 @@ CommandRunner = {
|
|||||||
bundle.counter++;
|
bundle.counter++;
|
||||||
if( bundle.counter >= bundle.script.length ) {
|
if( bundle.counter >= bundle.script.length ) {
|
||||||
if( bundle.project.run ) {
|
if( bundle.project.run ) {
|
||||||
bundle.script = [bundle.project.run];
|
|
||||||
bundle.counter = 0;
|
|
||||||
CommandRunner.launch(bundle, callback);
|
CommandRunner.launch(bundle, callback);
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
@@ -103,7 +103,7 @@ CommandRunner = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
launch: function(bundle, callback = undefined) {
|
launch: function(bundle, callback = undefined) {
|
||||||
var command = bundle.script[bundle.counter],
|
var command = bundle.project.run,
|
||||||
customs = {'%CWD%': bundle.project._id},
|
customs = {'%CWD%': bundle.project._id},
|
||||||
options = {
|
options = {
|
||||||
cwd: replace('%ROOT_CWD%/%CWD%', customs),
|
cwd: replace('%ROOT_CWD%/%CWD%', customs),
|
||||||
|
|||||||
Reference in New Issue
Block a user