mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
go-version constraints ignore pre-releases (#13234)
Go-version constraints ignore pre-releases. Rather than change the library further this PR simply changes the git version comparison to use simple version compare ignoring the issue of pre-releases. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -89,11 +89,11 @@ func (repo *Repository) CommitTree(author *Signature, committer *Signature, tree
|
||||
_, _ = messageBytes.WriteString(opts.Message)
|
||||
_, _ = messageBytes.WriteString("\n")
|
||||
|
||||
if CheckGitVersionConstraint(">= 1.7.9") == nil && (opts.KeyID != "" || opts.AlwaysSign) {
|
||||
if CheckGitVersionAtLeast("1.7.9") == nil && (opts.KeyID != "" || opts.AlwaysSign) {
|
||||
cmd.AddArguments(fmt.Sprintf("-S%s", opts.KeyID))
|
||||
}
|
||||
|
||||
if CheckGitVersionConstraint(">= 2.0.0") == nil && opts.NoGPGSign {
|
||||
if CheckGitVersionAtLeast("2.0.0") == nil && opts.NoGPGSign {
|
||||
cmd.AddArguments("--no-gpg-sign")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user