(changelog)
| 48 | } |
| 49 | |
| 50 | function commitChanges(changelog) { |
| 51 | try { |
| 52 | // Stage all changes |
| 53 | execSync("git add .", { stdio: "inherit" }); |
| 54 | |
| 55 | // Commit with the provided changelog |
| 56 | execSync(`git commit -m "${changelog}"`, { stdio: "inherit" }); |
| 57 | |
| 58 | console.log("\nChanges committed to Git"); |
| 59 | return true; |
| 60 | } catch (error) { |
| 61 | console.error("\nError committing changes:", error.message); |
| 62 | process.exit(1); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | function pushCommit() { |
| 67 | try { |