refactor(version): 统一版本号管理并更新至v2.8.5
将版本号从硬编码改为统一管理,使用package.json和全局变量维护版本信息
This commit is contained in:
parent
2f7f3e5ac6
commit
9d5c93b4c3
|
|
@ -35,7 +35,7 @@ func RunServer() {
|
||||||
|
|
||||||
fmt.Printf(`
|
fmt.Printf(`
|
||||||
欢迎使用 gin-vue-admin
|
欢迎使用 gin-vue-admin
|
||||||
当前版本:v2.8.5
|
当前版本:%s
|
||||||
加群方式:微信号:shouzi_1994 QQ群:470239250
|
加群方式:微信号:shouzi_1994 QQ群:470239250
|
||||||
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
||||||
插件市场:https://plugin.gin-vue-admin.com
|
插件市场:https://plugin.gin-vue-admin.com
|
||||||
|
|
@ -49,6 +49,6 @@ func RunServer() {
|
||||||
** 版权持有公司:北京翻转极光科技有限责任公司 **
|
** 版权持有公司:北京翻转极光科技有限责任公司 **
|
||||||
** 剔除授权标识需购买商用授权:https://gin-vue-admin.com/empower/index.html **
|
** 剔除授权标识需购买商用授权:https://gin-vue-admin.com/empower/index.html **
|
||||||
** 感谢您对Gin-Vue-Admin的支持与关注 合法授权使用更有利于项目的长久发展**
|
** 感谢您对Gin-Vue-Admin的支持与关注 合法授权使用更有利于项目的长久发展**
|
||||||
`, address, address, global.GVA_CONFIG.MCP.SSEPath, address, global.GVA_CONFIG.MCP.MessagePath)
|
`, global.Version, address, address, global.GVA_CONFIG.MCP.SSEPath, address, global.GVA_CONFIG.MCP.MessagePath)
|
||||||
initServer(address, Router, 10*time.Minute, 10*time.Minute)
|
initServer(address, Router, 10*time.Minute, 10*time.Minute)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
package docs
|
package docs
|
||||||
|
|
||||||
import "github.com/swaggo/swag"
|
import (
|
||||||
|
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||||
|
"github.com/swaggo/swag"
|
||||||
|
)
|
||||||
|
|
||||||
const docTemplate = `{
|
const docTemplate = `{
|
||||||
"schemes": {{ marshal .Schemes }},
|
"schemes": {{ marshal .Schemes }},
|
||||||
|
|
@ -9296,7 +9299,7 @@ const docTemplate = `{
|
||||||
|
|
||||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||||
var SwaggerInfo = &swag.Spec{
|
var SwaggerInfo = &swag.Spec{
|
||||||
Version: "v2.8.5",
|
Version: global.Version,
|
||||||
Host: "",
|
Host: "",
|
||||||
BasePath: "",
|
BasePath: "",
|
||||||
Schemes: []string{},
|
Schemes: []string{},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package global
|
||||||
|
|
||||||
|
// Version 版本信息
|
||||||
|
// 目前只有Version正式使用 其余为预留
|
||||||
|
const (
|
||||||
|
// Version 当前版本号
|
||||||
|
Version = "v2.8.5"
|
||||||
|
// AppName 应用名称
|
||||||
|
AppName = "Gin-Vue-Admin"
|
||||||
|
// Description 应用描述
|
||||||
|
Description = "使用gin+vue进行极速开发的全栈开发基础平台"
|
||||||
|
)
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* 网站配置文件
|
* 网站配置文件
|
||||||
*/
|
*/
|
||||||
|
import packageInfo from '../../package.json'
|
||||||
|
|
||||||
const greenText = (text) => `\x1b[32m${text}\x1b[0m`
|
const greenText = (text) => `\x1b[32m${text}\x1b[0m`
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
|
@ -17,7 +19,7 @@ export const viteLogo = (env) => {
|
||||||
`> 欢迎使用Gin-Vue-Admin,开源地址:https://github.com/flipped-aurora/gin-vue-admin`
|
`> 欢迎使用Gin-Vue-Admin,开源地址:https://github.com/flipped-aurora/gin-vue-admin`
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
console.log(greenText(`> 当前版本:v2.8.5`))
|
console.log(greenText(`> 当前版本:v${packageInfo.version}`))
|
||||||
console.log(greenText(`> 加群方式:微信:shouzi_1994 QQ群:470239250`))
|
console.log(greenText(`> 加群方式:微信:shouzi_1994 QQ群:470239250`))
|
||||||
console.log(
|
console.log(
|
||||||
greenText(`> 项目地址:https://github.com/flipped-aurora/gin-vue-admin`)
|
greenText(`> 项目地址:https://github.com/flipped-aurora/gin-vue-admin`)
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@
|
||||||
* */
|
* */
|
||||||
// 加载网站配置文件夹
|
// 加载网站配置文件夹
|
||||||
import { register } from './global'
|
import { register } from './global'
|
||||||
|
import packageInfo from '../../package.json'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install: (app) => {
|
install: (app) => {
|
||||||
register(app)
|
register(app)
|
||||||
console.log(`
|
console.log(`
|
||||||
欢迎使用 Gin-Vue-Admin
|
欢迎使用 Gin-Vue-Admin
|
||||||
当前版本:v2.8.5
|
当前版本:v${packageInfo.version}
|
||||||
加群方式:微信:shouzi_1994 QQ群:622360840
|
加群方式:微信:shouzi_1994 QQ群:622360840
|
||||||
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
项目地址:https://github.com/flipped-aurora/gin-vue-admin
|
||||||
插件市场:https://plugin.gin-vue-admin.com
|
插件市场:https://plugin.gin-vue-admin.com
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue