autoCommit

This commit is contained in:
OBKoro1 2019-12-20 11:39:02 +08:00
parent ae794e1430
commit f3727103e7
2 changed files with 8 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* Author : OBKoro1
* Date : 2019-12-19 20:23:57
* LastEditors : OBKoro1
* LastEditTime : 2019-12-20 11:38:26
* LastEditTime : 2019-12-20 11:38:56
* FilePath : /autoCommit/index.js
* Description : 自动commit
* https://github.com/OBKoro1
@ -23,16 +23,12 @@ class autoCommit {
this.commit();
}
commit() {
try {
this.myExecSync(
`sudo visudo && koro ALL = NOPASSWD: /sbin/poweroff, /sbin/start, /sbin/stop`
);
this.myExecSync(
`sudo systemsetup -setusingnetworktime off && sudo systemsetup -setdate 09/02/19 && sudo systemsetup -setusingnetworktime on`
);
} catch (err) {
this.myExecSync(`sudo visudo && koro ALL = NOPASSWD: /sbin/poweroff, /sbin/start, /sbin/stop`)
this.myExecSync(
`sudo systemsetup -setusingnetworktime off && sudo systemsetup -setdate 09/02/19 && sudo systemsetup -setusingnetworktime on`
);
}
this.myExecSync(
`git add . && git commit -m 'autoCommit' && git pull && git push`
);

View File

@ -1 +1 @@
20/12/2019 11:12:40
20/12/2019 11:12:02