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