update:2024-07-06 12:36:25 -AutoCommit

This commit is contained in:
539943419 committed 2024-07-06 12:36:25 +08:00
1 parent a65ec0e7db
commit 181be8d8f4
1 file changed
+8 -8
+8 -8
View File
@@ -14,13 +14,12 @@ const execSync = command =>
});
});
const readline = _readline.createInterface({
input: process.stdin,
output: process.stdout
});
const input = question =>
new Promise((resolve, rejects) => {
const input = question => {
const readline = _readline.createInterface({
input: process.stdin,
output: process.stdout
});
return new Promise((resolve, rejects) => {
try {
readline.question(question, output => {
readline.close();
@@ -30,6 +29,7 @@ const input = question =>
rejects(e);
}
});
};
const generateDate = function () {
const dateNow = new Date();
@@ -47,7 +47,7 @@ const generateDate = function () {
(async function () {
const remark = await input("remark:");
const message = `update:${generateDate()} ${remark ? "-remark:" + remark : ""} -AutoCommit`;
const message = `update:${generateDate()} ${remark ? '-remark:"' + remark + '"' : ""} -AutoCommit`;
await execSync(`git add ."`);
await execSync(`git commit -m "${message}"`);
await execSync("git push");