1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var child_process_1 = require("child_process");
|
4 | var fs_extra_1 = require("fs-extra");
|
5 | var path_1 = require("path");
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | function gitCommit(appPath) {
|
12 | try {
|
13 | child_process_1.execSync('git add -A', { stdio: 'ignore', cwd: appPath });
|
14 | child_process_1.execSync('git commit -m "Initial commit from ts-lib-scripts"', {
|
15 | stdio: 'ignore',
|
16 | cwd: appPath,
|
17 | });
|
18 | }
|
19 | catch (e) {
|
20 | try {
|
21 | fs_extra_1.removeSync(path_1.join(appPath, '.git'));
|
22 | }
|
23 | catch (removeErr) {
|
24 |
|
25 | }
|
26 | throw e;
|
27 | }
|
28 | }
|
29 | exports.default = gitCommit;
|
30 |
|
\ | No newline at end of file |