mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[FIX] fix Possible out of range error
This commit is contained in:
parent
cb56e1591e
commit
b0d9102e83
@ -313,24 +313,25 @@ func (h *handleMessageStore) handleBarrelEvent() {
|
||||
event.CodeVersion = codeVersion
|
||||
cdb.GetManager().ServiceEventDao().UpdateModel(&event)
|
||||
version,_:=cdb.GetManager().VersionInfoDao().GetVersionByEventID(eventID)
|
||||
infos:=strings.Split(codeVersion,":")
|
||||
for k,v:=range infos{
|
||||
i:=strings.Split(v," ")
|
||||
if k==0 {
|
||||
|
||||
}
|
||||
if k==1 {
|
||||
version.CodeVersion=i[0]
|
||||
|
||||
}
|
||||
if k==2 {
|
||||
version.Author=i[0]
|
||||
|
||||
}
|
||||
if k == 3 {
|
||||
version.CommitMsg=v
|
||||
}
|
||||
}
|
||||
//infos:=strings.Split(codeVersion,":")
|
||||
version.CodeVersion=codeVersion
|
||||
//for k,v:=range infos{
|
||||
// i:=strings.Split(v," ")
|
||||
// if k==0 {
|
||||
//
|
||||
// }
|
||||
// if k==1 {
|
||||
// version.CodeVersion=i[0]
|
||||
//
|
||||
// }
|
||||
// if k==2 {
|
||||
// version.Author=i[0]
|
||||
//
|
||||
// }
|
||||
// if k == 3 {
|
||||
// version.CommitMsg=v
|
||||
// }
|
||||
//}
|
||||
cdb.GetManager().VersionInfoDao().UpdateModel(version)
|
||||
h.log.Infof("run web hook update code version .event_id %s code_version %s", eventID, codeVersion)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user