Browse Source

feature(scripts): add git commands

pull/1637/head
mehmet-erim 7 years ago
parent
commit
cbc1e3b211
  1. 6
      npm/ng-packs/scripts/build.js
  2. 9
      npm/ng-packs/scripts/sync.js

6
npm/ng-packs/scripts/build.js

@ -39,5 +39,11 @@ import fse from 'fs-extra';
await execa('git', ['add', '../dist/*', '../package.json'], { stdout: 'inherit' });
await execa('git', ['commit', '-m', 'Build ng packages'], { stdout: 'inherit' });
try {
await execa('git', ['push', 'origin']);
} catch (error) {
console.error('An error occured while pushing the git files:\n' + error.stderr);
}
process.exit(0);
})();

9
npm/ng-packs/scripts/sync.js

@ -21,5 +21,14 @@ import fse from 'fs-extra';
await fse.writeJSON(srcPackagePath, { ...srcPackage, version }, { spaces: 2 });
});
await execa('git', ['add', '../packages/*', '../package.json'], { stdout: 'inherit' });
await execa('git', ['commit', '-m', 'Sync ng source packages versions'], { stdout: 'inherit' });
try {
await execa('git', ['push', 'origin']);
} catch (error) {
console.error('An error occured while pushing the git files:\n' + error.stderr);
}
process.exit(0);
})();

Loading…
Cancel
Save