Skip to content

Commit

Permalink
feat: add "build.post.install" build hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jquick-axway authored and sgtcoolguy committed Oct 15, 2020
1 parent 340bc36 commit 372bf70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions android/cli/hooks/run.js
Expand Up @@ -226,6 +226,10 @@ exports.init = function (logger, config, cli) {
}, next);
},

function (next) {
cli.emit('build.post.install', builder, next);
},

function (next) {
if (!cli.argv.launch) {
logger.info(__('Skipping launch of: %s', (builder.appid + '/.' + builder.classname + 'Activity').cyan));
Expand Down
2 changes: 1 addition & 1 deletion iphone/cli/hooks/install.js
Expand Up @@ -126,7 +126,7 @@ exports.init = function (logger, config, cli) {
}
}, 50);
}
next();
cli.emit('build.post.install', builder, next);
})
.on('app-started', function () {
runningCount++;
Expand Down
7 changes: 5 additions & 2 deletions iphone/cli/hooks/run.js
Expand Up @@ -161,8 +161,11 @@ exports.init = function (logger, config, cli) {
logger.error('[' + simHandle.appName + '] ' + msg);
})
.on('app-started', function () {
finished && finished();
finished = null;
// TODO: Add "installed" event to "ioslib" module for simulators and emit below event from there.
cli.emit('build.post.install', builder, () => {
finished && finished();
finished = null;
});
})
.on('app-quit', function (code) {
if (code) {
Expand Down

0 comments on commit 372bf70

Please sign in to comment.