|
|
@ -10,6 +10,8 @@ import (
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/go-xorm/xorm"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/gogits/gogs/modules/git"
|
|
|
|
"github.com/gogits/gogs/modules/git"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -37,6 +39,13 @@ type Release struct {
|
|
|
|
Created time.Time `xorm:"CREATED"`
|
|
|
|
Created time.Time `xorm:"CREATED"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (r *Release) AfterSet(colName string, _ xorm.Cell) {
|
|
|
|
|
|
|
|
switch colName {
|
|
|
|
|
|
|
|
case "created":
|
|
|
|
|
|
|
|
r.Created = regulateTimeZone(r.Created)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// IsReleaseExist returns true if release with given tag name already exists.
|
|
|
|
// IsReleaseExist returns true if release with given tag name already exists.
|
|
|
|
func IsReleaseExist(repoId int64, tagName string) (bool, error) {
|
|
|
|
func IsReleaseExist(repoId int64, tagName string) (bool, error) {
|
|
|
|
if len(tagName) == 0 {
|
|
|
|
if len(tagName) == 0 {
|
|
|
|