-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
55 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ go.work | |
/conf/app.ini | ||
/runtime | ||
.idea/ | ||
.release_version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
1. 单应用打包 | ||
2. 支持邮件发送 | ||
3. 用户密码设置 | ||
4. 支持用户定时任务清理,更新定时时间 | ||
5. 查看定时清理日志 | ||
6. 单应用的html浏览器自动缓存 | ||
7. gin的日志使用logrus | ||
8. 支持异步发送 | ||
9. 支持钉钉消息推送 | ||
10. 支持自定义的webhook推送 | ||
11. 支持自动初始化表,以及初始化账号 | ||
12. 调整日志格式 | ||
13. 支持更多的api接入示例 | ||
14. 支持发送实例的暂停与开启 | ||
15. 支持企业微信消息发送 | ||
16. 支持站点信息自定义 | ||
17. 支持数据统计展示 | ||
18. 支持docker部署,从环境变量启动 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,29 @@ | ||
package constant | ||
|
||
import "strings" | ||
import ( | ||
"embed" | ||
"io/fs" | ||
"log" | ||
"strings" | ||
) | ||
|
||
var LatestVersion = map[string]string{} | ||
|
||
//var V1Version = "v0.0.1" | ||
//var V1VersionDesc = ` | ||
//1. 单应用打包 | ||
//2. 支持邮件发送 | ||
//3. 用户密码设置 | ||
//4. 支持用户定时任务清理,更新定时时间 | ||
//5. 查看定时清理日志 | ||
//6. 单应用的html浏览器自动缓存 | ||
//7. gin的日志使用logrus | ||
//8. 支持异步发送 | ||
//` | ||
// | ||
//var V2Version = "v0.0.2" | ||
//var V2VersionDesc = ` | ||
//1. 单应用打包 | ||
//2. 支持邮件发送 | ||
//3. 用户密码设置 | ||
//4. 支持用户定时任务清理,更新定时时间 | ||
//5. 查看定时清理日志 | ||
//6. 单应用的html浏览器自动缓存 | ||
//7. gin的日志使用logrus | ||
//8. 支持异步发送 | ||
//9. 支持钉钉消息推送 | ||
//` | ||
// | ||
//var V3Version = "v0.0.3" | ||
//var V3VersionDesc = ` | ||
//1. 单应用打包 | ||
//2. 支持邮件发送 | ||
//3. 用户密码设置 | ||
//4. 支持用户定时任务清理,更新定时时间 | ||
//5. 查看定时清理日志 | ||
//6. 单应用的html浏览器自动缓存 | ||
//7. gin的日志使用logrus | ||
//8. 支持异步发送 | ||
//9. 支持钉钉消息推送 | ||
//10. 支持自定义的webhook推送 | ||
//` | ||
// | ||
//var V4Version = "v0.0.4" | ||
//var V4VersionDesc = ` | ||
//1. 单应用打包 | ||
//2. 支持邮件发送 | ||
//3. 用户密码设置 | ||
//4. 支持用户定时任务清理,更新定时时间 | ||
//5. 查看定时清理日志 | ||
//6. 单应用的html浏览器自动缓存 | ||
//7. gin的日志使用logrus | ||
//8. 支持异步发送 | ||
//9. 支持钉钉消息推送 | ||
//10. 支持自定义的webhook推送 | ||
//11. 支持自动初始化表,以及初始化账号 | ||
//` | ||
|
||
//var V5Version = "v0.0.5" | ||
//var V5VersionDesc = ` | ||
//1. 单应用打包 | ||
//2. 支持邮件发送 | ||
//3. 用户密码设置 | ||
//4. 支持用户定时任务清理,更新定时时间 | ||
//5. 查看定时清理日志 | ||
//6. 单应用的html浏览器自动缓存 | ||
//7. gin的日志使用logrus | ||
//8. 支持异步发送 | ||
//9. 支持钉钉消息推送 | ||
//10. 支持自定义的webhook推送 | ||
//11. 支持自动初始化表,以及初始化账号 | ||
//12. 调整日志格式 | ||
//13. 支持更多的api接入示例 | ||
//` | ||
|
||
var LatestVersionS = "v0.1.0" | ||
var LatestVersionDesc = ` | ||
1. 单应用打包 | ||
2. 支持邮件发送 | ||
3. 用户密码设置 | ||
4. 支持用户定时任务清理,更新定时时间 | ||
5. 查看定时清理日志 | ||
6. 单应用的html浏览器自动缓存 | ||
7. gin的日志使用logrus | ||
8. 支持异步发送 | ||
9. 支持钉钉消息推送 | ||
10. 支持自定义的webhook推送 | ||
11. 支持自动初始化表,以及初始化账号 | ||
12. 调整日志格式 | ||
13. 支持更多的api接入示例 | ||
14. 支持发送实例的暂停与开启 | ||
15. 支持企业微信消息发送 | ||
16. 支持站点信息自定义 | ||
17. 支持数据统计展示 | ||
` | ||
func readFileContent(path string, f embed.FS) string { | ||
data, err := fs.ReadFile(f, path) | ||
if err != nil { | ||
return "" | ||
} | ||
return string(data) | ||
} | ||
|
||
func init() { | ||
LatestVersion["version"] = LatestVersionS | ||
LatestVersion["desc"] = strings.TrimSpace(LatestVersionDesc) | ||
func InitReleaseInfo(releaseInfo embed.FS) { | ||
version := strings.Trim(readFileContent(".release_version", releaseInfo), "\n\r") | ||
if version == "" { | ||
version = "default" | ||
} | ||
desc := strings.Trim(readFileContent(".release_log", releaseInfo), "\n\r") | ||
log.Printf("[message-nest] release version: %s", version) | ||
LatestVersion["version"] = version | ||
LatestVersion["desc"] = desc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters