build(version): 发布预发版本1.0.0-alpha.1
This commit is contained in:
		
							parent
							
								
									7e9166e104
								
							
						
					
					
						commit
						8630c15a9a
					
				| @ -40,13 +40,10 @@ task('version', (done) => { | |||||||
|     return |     return | ||||||
|   } |   } | ||||||
|   const themePath = 'theme.yaml' |   const themePath = 'theme.yaml' | ||||||
|   const layoutPath = 'template/layout.html' |  | ||||||
|   const packagePath = 'package.json' |   const packagePath = 'package.json' | ||||||
|   const themeData = fs.readFileSync(themePath, 'utf8') |   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(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') |   let packageData = fs.readFileSync(packagePath, 'utf8') | ||||||
|     .replace(/"version":\s*"[^"]+"/, `"version": "${version}"`) |     .replace(/"version":\s*"[^"]+"/, `"version": "${version}"`) | ||||||
|   fs.writeFileSync(packagePath, packageData) |   fs.writeFileSync(packagePath, packageData) | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "halo-theme-dream2.0", |   "name": "halo-theme-dream2.0", | ||||||
|   "version": "0.0.1", |   "version": "1.0.0-alpha.1", | ||||||
|   "description": "梦之城,童话梦境,动漫类型博客主题。", |   "description": "梦之城,童话梦境,动漫类型博客主题。", | ||||||
|   "main": "index.js", |   "main": "index.js", | ||||||
|   "author": "nineya", |   "author": "nineya", | ||||||
|  | |||||||
| @ -22,6 +22,6 @@ spec: | |||||||
|   settingName: theme-dream-setting |   settingName: theme-dream-setting | ||||||
|   configMapName: theme-dream-configMap |   configMapName: theme-dream-configMap | ||||||
|   # 版本号 |   # 版本号 | ||||||
|   version: 0.0.1 |   version: 1.0.0-alpha.1 | ||||||
|   # 最低支持的 Halo 版本 |   # 最低支持的 Halo 版本 | ||||||
|   require: ">=2.0.0" |   require: ">=2.0.0" | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user