@@ -25,6 +25,10 @@ type Info struct {
2525 URL string
2626}
2727
28+func (i Info) IsDevelopment() bool {
29+ return i.Current == "devel" || i.Current == "unknown" || strings.Contains(i.Current, "dirty")
30+}
31+
2832// Available returns true if there's an update available.
2933//
3034// If both current and latest are stable versions, returns true if versions are
@@ -52,10 +56,6 @@ func Check(ctx context.Context, current string, client Client) (Info, error) {
5256 Latest: current,
5357 }
5458
55− if info.Current == "devel" || info.Current == "unknown" || strings.Contains(info.Current, "dirty") {
56− return info, nil
57− }
58−
5959 release, err := client.Latest(ctx)
6060 if err != nil {
6161 return info, fmt.Errorf("failed to fetch latest release: %w", err)