mirror of
https://github.com/barkeser2002/bariskeser.github.io.git
synced 2026-09-25 06:40:00 +03:00
15 lines
403 B
TypeScript
15 lines
403 B
TypeScript
import { execSync } from 'child_process';
|
|
|
|
/**
|
|
* Executes commands and commits changes with the message provided.
|
|
* @param commands Commands to be executed
|
|
* @param msg Commit message.
|
|
*/
|
|
export const execCommandsAndCommit = (commands: string[], msg: string) => {
|
|
const cmds = commands.slice();
|
|
cmds.push(`git commit -m "${msg}"`);
|
|
execSync(cmds.join(' && '), {
|
|
stdio: [0, 1, 2],
|
|
});
|
|
};
|