From 2adbe43e8f480f25bac6e055e4b32fb0838df8aa Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 3 Dec 2022 21:16:36 +0800 Subject: [PATCH] :tada: v0.5.7 is out --- config.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 5bceee7..f994658 100644 --- a/config.js +++ b/config.js @@ -6,7 +6,7 @@ let config = { auth_cookie_name: 'blog', uploadPath: process.env.UPLOAD_PATH || './data/upload', systemName: 'Blog', - systemVersion: 'v0.5.6', + systemVersion: 'v0.0.0', cacheMaxAge: 30 * 24 * 3600, // 30 days maxCachePosts: 32 }; @@ -15,6 +15,8 @@ function init() { if (!fs.existsSync(config.uploadPath)) { fs.mkdirSync(config.uploadPath); } + let meta = JSON.parse(fs.readFileSync('package.json').toString()); + config.systemVersion = `v${meta.version}` } init(); diff --git a/package.json b/package.json index 1c26cb7..9a1f406 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blog", - "version": "0.5.6", + "version": "0.5.7", "private": true, "scripts": { "start": "node ./app.js",