File tree 4 files changed +10
-1
lines changed
4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ CREATE TABLE `package` (
111
111
` deployment_id` int DEFAULT NULL ,
112
112
` size` bigint DEFAULT NULL ,
113
113
` hash` varchar (256 ) DEFAULT NULL ,
114
+ ` description` TEXT DEFAULT NULL ,
114
115
` download` varchar (256 ) DEFAULT NULL ,
115
116
` active` int DEFAULT ' 0' ,
116
117
` failed` int DEFAULT ' 0' ,
@@ -120,6 +121,9 @@ CREATE TABLE `package` (
120
121
) ENGINE= InnoDB DEFAULT CHARSET= utf8mb3;
121
122
/* !40101 SET character_set_client = @saved_cs_client */ ;
122
123
124
+ -- `description` is not part of v1.0.1, it can be added by
125
+ -- ALTER TABLE `package` ADD `description` TEXT DEFAULT NULL;
126
+
123
127
--
124
128
-- Dumping data for table `package`
125
129
--
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ type Package struct {
10
10
Failed * int `json:"failed"`
11
11
Installed * int `json:"installed"`
12
12
CreateTime * int64 `json:"create_time"`
13
+ Description * string `json:"description"`
13
14
}
14
15
15
16
func (Package ) TableName () string {
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ type createBundleReq struct {
60
60
AppName * string `json:"appName" binding:"required"`
61
61
Deployment * string `json:"deployment" binding:"required"`
62
62
DownloadUrl * string `json:"downloadUrl" binding:"required"`
63
+ Description * string `json:"description" binding:"required"`
63
64
Version * string `json:"version" binding:"required"`
64
65
Size * int64 `json:"size" binding:"required"`
65
66
Hash * string `json:"hash" binding:"required"`
@@ -114,6 +115,7 @@ func (App) CreateBundle(ctx *gin.Context) {
114
115
Size : createBundleReq .Size ,
115
116
Hash : createBundleReq .Hash ,
116
117
Download : createBundleReq .DownloadUrl ,
118
+ Description : createBundleReq .Description ,
117
119
Active : utils .CreateInt (0 ),
118
120
Installed : utils .CreateInt (0 ),
119
121
Failed : utils .CreateInt (0 ),
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
type Client struct {}
17
17
type updateInfo struct {
18
18
DownloadUrl string `json:"download_url"`
19
- // Description string `json:"description"`
19
+ Description string `json:"description"`
20
20
IsAvailable bool `json:"is_available"`
21
21
IsDisabled bool `json:"is_disabled"`
22
22
TargetBinaryRange string `json:"target_binary_range"`
@@ -62,6 +62,7 @@ func (Client) CheckUpdate(ctx *gin.Context) {
62
62
label := strconv .Itoa (* packag .Id )
63
63
updateInfoRedis .Label = label
64
64
updateInfoRedis .DownloadUrl = config .ResourceUrl + * packag .Download
65
+ updateInfoRedis .Description = * packag .Description
65
66
}
66
67
}
67
68
deploymentVersionNew := model.DeploymentVersion {}.GetNewVersionByKeyDeploymentId (* deployment .Id )
@@ -79,6 +80,7 @@ func (Client) CheckUpdate(ctx *gin.Context) {
79
80
updateInfo .IsMandatory = true
80
81
updateInfo .Label = updateInfoRedis .Label
81
82
updateInfo .DownloadUrl = updateInfoRedis .DownloadUrl
83
+ updateInfo .Description = updateInfoRedis .Description
82
84
} else if updateInfoRedis .NewVersion != "" && appVersion != updateInfoRedis .NewVersion && utils .FormatVersionStr (appVersion ) < utils .FormatVersionStr (updateInfoRedis .NewVersion ) {
83
85
updateInfo .TargetBinaryRange = updateInfoRedis .NewVersion
84
86
updateInfo .UpdateAppVersion = true
You can’t perform that action at this time.
0 commit comments