mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Bug fix for repo releases sorted (#3522)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com> Use TimeStampNow function
This commit is contained in:
		@@ -36,7 +36,7 @@ type Release struct {
 | 
				
			|||||||
	IsPrerelease     bool           `xorm:"NOT NULL DEFAULT false"`
 | 
						IsPrerelease     bool           `xorm:"NOT NULL DEFAULT false"`
 | 
				
			||||||
	IsTag            bool           `xorm:"NOT NULL DEFAULT false"`
 | 
						IsTag            bool           `xorm:"NOT NULL DEFAULT false"`
 | 
				
			||||||
	Attachments      []*Attachment  `xorm:"-"`
 | 
						Attachments      []*Attachment  `xorm:"-"`
 | 
				
			||||||
	CreatedUnix      util.TimeStamp `xorm:"created INDEX"`
 | 
						CreatedUnix      util.TimeStamp `xorm:"INDEX"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (r *Release) loadAttributes(e Engine) error {
 | 
					func (r *Release) loadAttributes(e Engine) error {
 | 
				
			||||||
@@ -134,6 +134,8 @@ func createTag(gitRepo *git.Repository, rel *Release) error {
 | 
				
			|||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return fmt.Errorf("CommitsCount: %v", err)
 | 
								return fmt.Errorf("CommitsCount: %v", err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							rel.CreatedUnix = util.TimeStampNow()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user