build(version): 发布预发版本1.0.0-alpha.1

This commit is contained in:
nineya 2023-03-27 21:01:46 +08:00
parent 7e9166e104
commit 8630c15a9a
3 changed files with 3 additions and 6 deletions

View File

@ -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)

View File

@ -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",

View File

@ -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"