1
0
silverbullet/plugs/core/git.ts
2022-03-23 15:41:12 +01:00

13 lines
385 B
TypeScript

import { syscall } from "./lib/syscall";
export async function commit() {
console.log("Snapshotting the current space to git");
await syscall("shell.run", "git", ["add", "./*.md"]);
try {
await syscall("shell.run", "git", ["commit", "-a", "-m", "Snapshot"]);
} catch (e) {
// We can ignore, this happens when there's no changes to commit
}
console.log("Done!");
}