mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2025-01-10 01:02:11 +08:00
ff104f543d
* fix api content change from string to json #99 * block incompatible version #99 * fix tests #99 * add mote tests #99
25 lines
769 B
Go
25 lines
769 B
Go
package versions
|
|
|
|
import "golang.org/x/mod/semver"
|
|
|
|
const (
|
|
// MinAgh minimal adguardhome version
|
|
MinAgh = "v0.107.0"
|
|
// LastStringCustomRules last adguardhome version with string payload custom rules
|
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
|
LastStringCustomRules = "v0.107.13"
|
|
// IncompatibleAPI adguardhome version with incompatible API
|
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
|
IncompatibleAPI = "v0.107.14"
|
|
// FixedIncompatibleAPI adguardhome version with fixed API
|
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
|
FixedIncompatibleAPI = "v0.107.15"
|
|
)
|
|
|
|
func IsNewerThan(v1 string, v2 string) bool {
|
|
return semver.Compare(v1, v2) == 1
|
|
}
|
|
|
|
func IsSame(v1 string, v2 string) bool {
|
|
return semver.Compare(v1, v2) == 0
|
|
}
|