From 8630c15a9ad531f8bb0d8678f285a51c6c1341f6 Mon Sep 17 00:00:00 2001 From: nineya Date: Mon, 27 Mar 2023 21:01:46 +0800 Subject: [PATCH] =?UTF-8?q?build(version):=20=E5=8F=91=E5=B8=83=E9=A2=84?= =?UTF-8?q?=E5=8F=91=E7=89=88=E6=9C=AC1.0.0-alpha.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 5 +---- package.json | 2 +- theme.yaml | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 350fb41..89423a5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -40,13 +40,10 @@ task('version', (done) => { return } const themePath = 'theme.yaml' - const layoutPath = 'template/layout.html' const packagePath = 'package.json' const themeData = fs.readFileSync(themePath, 'utf8') - .replace(/^version:\s+[^\s]+$/m, 'version: ' + version) + .replace(/^(\s+version:)\s+[^\s]+$/m, '$1 ' + version) fs.writeFileSync(themePath, themeData) - fs.writeFileSync(layoutPath, fs.readFileSync(layoutPath, 'utf8') - .replace(/#global\s+theme_version\s*="[^\s]+"/, `#global theme_version="${version}"`)) let packageData = fs.readFileSync(packagePath, 'utf8') .replace(/"version":\s*"[^"]+"/, `"version": "${version}"`) fs.writeFileSync(packagePath, packageData) diff --git a/package.json b/package.json index 051ba6d..91f9c58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "halo-theme-dream2.0", - "version": "0.0.1", + "version": "1.0.0-alpha.1", "description": "梦之城,童话梦境,动漫类型博客主题。", "main": "index.js", "author": "nineya", diff --git a/theme.yaml b/theme.yaml index 91e7b1b..4061997 100644 --- a/theme.yaml +++ b/theme.yaml @@ -22,6 +22,6 @@ spec: settingName: theme-dream-setting configMapName: theme-dream-configMap # 版本号 - version: 0.0.1 + version: 1.0.0-alpha.1 # 最低支持的 Halo 版本 require: ">=2.0.0" \ No newline at end of file