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({ const input = question => {
input: process.stdin, const readline = _readline.createInterface({
output: process.stdout input: process.stdin,
}); output: process.stdout
});
const input = question => return new Promise((resolve, rejects) => {
new Promise((resolve, rejects) => {
try { try {
readline.question(question, output => { readline.question(question, output => {
readline.close(); readline.close();
@@ -30,6 +29,7 @@ const input = question =>
rejects(e); rejects(e);
} }
}); });
};
const generateDate = function () { const generateDate = function () {
const dateNow = new Date(); const dateNow = new Date();
@@ -47,7 +47,7 @@ const generateDate = function () {
(async function () { (async function () {
const remark = await input("remark:"); 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 add ."`);
await execSync(`git commit -m "${message}"`); await execSync(`git commit -m "${message}"`);
await execSync("git push"); await execSync("git push");