提交 2ef230ad 编写于 作者: W wizardforcel

2020-04-24 11:15:30

上级 27a69c41
var process = require('child_process');
var moment = require('moment')
var getTimeStr = function() {
var tm = new Date();
var o = {
yr: tm.getFullYear(),
mon: tm.getMonth() + 1,
dt: tm.getDate(),
hr: tm.getHours(),
min: tm.getMinutes(),
sec: tm.getSeconds()
};
for(var i in o)
{
o[i] = o[i].toString();
if(o[i].length < 2)
o[i] = '0' + o[i];
}
return o.yr + '-' + o.mon + '-' + o.dt +
' ' + o.hr + ':' + o.min + ':' + o.sec;
};
var tmstr = moment().format('YYYY-MM-DD HH:mm:ss')
var cmds = [
'git add -A',
'git commit -m "' + getTimeStr() + '"',
'git commit -m "' + tmstr + '"',
'git push',
'hexo clean',
'hexo g -d'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册