Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

How to listen an event and run a remote command (blocking)? #271

Open
gremo opened this issue Jun 12, 2020 · 1 comment
Open

How to listen an event and run a remote command (blocking)? #271

gremo opened this issue Jun 12, 2020 · 1 comment

Comments

@gremo
Copy link

gremo commented Jun 12, 2020

The suggested solution is this:

  shipit.blTask('app:build', async () => {
    await shipit.remote(`cd ${shipit.releasePath} && yarn install && yarn build`);
  });

  shipit.on('updated', () => {
    shipit.start('app:build');
  });

But how to avoid the app:build task (which make sense only during deploy or rollback, using releasePath)?

  // Not blocking - NOT WORKING
  shipit.on('updated', async () => {
    await shipit.remote(`cd ${shipit.releasePath} && yarn install && yarn build`);
  });

  // Not blocking - NOT WORKING
  shipit.on('updated', () => {
    return shipit.remote(`cd ${shipit.releasePath} && yarn install && yarn build`);
  });
@gremo gremo changed the title Ho to listen to an event and run a remote command (blocking)? How to listen an event and run a remote command (blocking)? Jun 12, 2020
@gregberge
Copy link
Member

Hope someone could help you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants