no message
This commit is contained in:
parent
d246199a5e
commit
497da96fda
@ -2,10 +2,10 @@
|
|||||||
directory=/var/www
|
directory=/var/www
|
||||||
|
|
||||||
# 生产环境
|
# 生产环境
|
||||||
command=php bin/laravels start -i
|
#command=php bin/laravels start -i
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
#command=./bin/inotify ./app
|
command=./bin/inotify ./app
|
||||||
|
|
||||||
numprocs=1
|
numprocs=1
|
||||||
autostart=true
|
autostart=true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "DooTask",
|
"name": "DooTask",
|
||||||
"version": "0.2.12",
|
"version": "0.2.13",
|
||||||
"description": "DooTask is task management system",
|
"description": "DooTask is task management system.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run development",
|
"dev": "npm run development",
|
||||||
"development": "mix",
|
"development": "mix",
|
||||||
@ -9,7 +9,9 @@
|
|||||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||||
"hot": "mix watch --hot",
|
"hot": "mix watch --hot",
|
||||||
"prod": "npm run production",
|
"prod": "npm run production",
|
||||||
"production": "mix --production"
|
"production": "mix --production",
|
||||||
|
"version": "node ./version.js",
|
||||||
|
"native": "node ./nativefier.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios": "^0.21",
|
"axios": "^0.21",
|
||||||
|
@ -203,6 +203,7 @@ export default {
|
|||||||
'$route' (route) {
|
'$route' (route) {
|
||||||
this.curPath = route.path;
|
this.curPath = route.path;
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogMsgPush(data) {
|
dialogMsgPush(data) {
|
||||||
if (this.natificationHidden && this.natificationReady) {
|
if (this.natificationHidden && this.natificationReady) {
|
||||||
const {id, dialog_id, type, msg} = data;
|
const {id, dialog_id, type, msg} = data;
|
||||||
@ -238,6 +239,15 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
natificationHidden(val) {
|
||||||
|
clearTimeout(this.notificationTimeout);
|
||||||
|
if (!val) {
|
||||||
|
this.notificationTimeout = setTimeout(() => {
|
||||||
|
this.notificationClass.close();
|
||||||
|
}, 6000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
32
version.js
vendored
Normal file
32
version.js
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const path = require("path");
|
||||||
|
const exec = require('child_process').exec;
|
||||||
|
const packageFile = path.resolve(process.cwd(), "package.json");
|
||||||
|
|
||||||
|
function runExec(command, cb) {
|
||||||
|
exec(command, function (err, stdout, stderr) {
|
||||||
|
if (err != null) {
|
||||||
|
return cb(new Error(err), null);
|
||||||
|
} else if (typeof (stderr) != "string") {
|
||||||
|
return cb(new Error(stderr), null);
|
||||||
|
} else {
|
||||||
|
return cb(null, stdout);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
runExec("git rev-list --all --count", function (err, response) {
|
||||||
|
if (err) {
|
||||||
|
console.error(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let num = parseInt(response)
|
||||||
|
if (isNaN(num) || Math.floor(num % 100) < 0) {
|
||||||
|
console.error("get version error " + response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let ver = Math.floor(num / 10000) + "." + Math.floor(num / 100) + "." + Math.floor(num % 100)
|
||||||
|
let newResult = fs.readFileSync(packageFile, 'utf8').replace(/"version":\s*"(.*?)"/, `"version": "${ver}"`);
|
||||||
|
fs.writeFileSync(packageFile, newResult, 'utf8');
|
||||||
|
console.log("new version: " + ver);
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user