update:2024-07-06 12:36:25 -AutoCommit
This commit is contained in:
1 parent
a65ec0e7db
commit
181be8d8f4
1 file changed
+4
-4
+4
-4
@@ -14,13 +14,12 @@ const execSync = command =>
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const input = question => {
|
||||||
const readline = _readline.createInterface({
|
const readline = _readline.createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
output: process.stdout
|
output: process.stdout
|
||||||
});
|
});
|
||||||
|
return new Promise((resolve, rejects) => {
|
||||||
const input = question =>
|
|
||||||
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");
|
||||||
|
|||||||
Reference in new issue
Block a user