mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(server): exclude tags from version check (#382)
This commit is contained in:
parent
6196dcaab9
commit
ab8f25d56f
2 changed files with 33 additions and 1 deletions
|
@ -65,7 +65,7 @@ func (c *Checker) get(ctx context.Context) (*Release, error) {
|
|||
}
|
||||
|
||||
func (c *Checker) CheckNewVersion(ctx context.Context, version string) (bool, string, error) {
|
||||
if version == "dev" {
|
||||
if isDevelop(version) {
|
||||
return false, "", nil
|
||||
}
|
||||
|
||||
|
@ -99,3 +99,15 @@ func (c *Checker) checkNewVersion(version string, release *Release) (bool, strin
|
|||
|
||||
return false, "", nil
|
||||
}
|
||||
|
||||
func isDevelop(version string) bool {
|
||||
tags := []string{"dev", "develop", "master", "latest"}
|
||||
|
||||
for _, tag := range tags {
|
||||
if version == tag {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue