How to use exec-sh - 9 common examples

To help you get started, we’ve selected a few exec-sh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github framework7io / framework7-cli / create-app / index.js View on Github external
}
  } catch (err) {
    logger.statusError('Error installing NPM Dev Dependencies');
    if (err) logger.error(err.stderr);
    errorExit();
    return;
  }
  logger.statusDone('Installing NPM Dev Dependencies');

  if (packageJson.postInstall && packageJson.postInstall.length) {
    logger.statusStart('Executing NPM Scripts');
    try {
      if (!isRunningInCwd) {
        await exec.promise(`cd ${cwd.replace(/ /g, '\\ ')} && npm run postinstall`, true);
      } else {
        await exec.promise('npm run postinstall', true);
      }
    } catch (err) {
      logger.statusError('Error executing NPM Scripts');
      if (err) logger.error(err.stderr);
      errorExit();
      return;
    }
    logger.statusDone('Executing NPM Scripts');
  }

  // Create Cordova project
  if (type.indexOf('cordova') >= 0) {
    logger.statusStart(`${'Creating Cordova project'} ${waitText}`);
    try {
      await createCordova(options);
    } catch (err) {
github HuasoFoundries / google-maps-documentation / index.js View on Github external
async function commit(sentence) {
  let out;
  debug(`performing ${chalk.cyan(sentence)}`);
  try {
    out = await execShPromise(sentence, true);
  } catch (e) {
    debug('Error: ', e);
    debug('Stderr: ', e.stderr);
    debug('Stdout: ', e.stdout);
    return (
      e.stdout.indexOf('nothing to commit') !== -1 ||
      e.stderr.indexOf('nothing to commit') !== -1
    );
  }

  return out.stdout.indexOf('nothing to commit') !== -1;
}
github framework7io / framework7-cli / scripts / release.js View on Github external
],
    },
  ]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github framework7io / framework7-cli / scripts / release.js View on Github external
name: 'YES',
          value: true,
        },
        {
          name: 'NO',
          value: false,
        },
      ],
    },
  ]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github framework7io / framework7-cli / scripts / release.js View on Github external
value: true,
        },
        {
          name: 'NO',
          value: false,
        },
      ],
    },
  ]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github framework7io / framework7-cli / scripts / release.js View on Github external
]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github framework7io / framework7-cli / scripts / release.js View on Github external
{
          name: 'YES',
          value: true,
        },
        {
          name: 'NO',
          value: false,
        },
      ],
    },
  ]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github framework7io / framework7-cli / scripts / release.js View on Github external
{
          name: 'NO',
          value: false,
        },
      ],
    },
  ]);
  pkg.version = options.version;

  fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2));

  await exec.promise('git pull');
  await exec.promise('npm i');
  await exec.promise('git add .');
  await exec.promise(`git commit -m "${pkg.version} release"`);
  await exec.promise('git push');
  await exec.promise(`git tag v${pkg.version}`);
  await exec.promise('git push origin --tags');
  if (options.beta) {
    await exec.promise('npm publish --tag beta');
  } else {
    await exec.promise('npm publish');
  }
}
github azukiapp / azk / lib / azk / cli / ui.js View on Github external
execSh: function() {
    for (var args = [],
        $__10 = 0; $__10 < arguments.length; $__10++)
      args[$__10] = arguments[$__10];
    execSh.apply(null, $traceurRuntime.toObject(args));
  }
};

exec-sh

Execute shell command forwarding all stdio.

MIT
Latest version published 3 years ago

Package Health Score

76 / 100
Full package analysis

Popular exec-sh functions