feat: option to specify npx quartz sync message (closes #583)
This commit is contained in:
parent
74c63e448e
commit
cf6ab9e933
@ -41,6 +41,11 @@ export const SyncArgv = {
|
|||||||
default: true,
|
default: true,
|
||||||
describe: "create a git commit for your unsaved changes",
|
describe: "create a git commit for your unsaved changes",
|
||||||
},
|
},
|
||||||
|
message: {
|
||||||
|
string: true,
|
||||||
|
alias: ["m"],
|
||||||
|
describe: "option to override the default Quartz commit message",
|
||||||
|
},
|
||||||
push: {
|
push: {
|
||||||
boolean: true,
|
boolean: true,
|
||||||
default: true,
|
default: true,
|
||||||
|
@ -483,8 +483,9 @@ export async function handleSync(argv) {
|
|||||||
dateStyle: "medium",
|
dateStyle: "medium",
|
||||||
timeStyle: "short",
|
timeStyle: "short",
|
||||||
})
|
})
|
||||||
|
const commitMessage = argv.message ?? `Quartz sync: ${currentTimestamp}`
|
||||||
spawnSync("git", ["add", "."], { stdio: "inherit" })
|
spawnSync("git", ["add", "."], { stdio: "inherit" })
|
||||||
spawnSync("git", ["commit", "-m", `Quartz sync: ${currentTimestamp}`], { stdio: "inherit" })
|
spawnSync("git", ["commit", "-m", commitMessage], { stdio: "inherit" })
|
||||||
|
|
||||||
if (contentStat.isSymbolicLink()) {
|
if (contentStat.isSymbolicLink()) {
|
||||||
// put symlink back
|
// put symlink back
|
||||||
|
Loading…
Reference in New Issue
Block a user