diff --git a/cmd/humanlog/versions.go b/cmd/humanlog/versions.go index 07eb7f60..e2bc895c 100644 --- a/cmd/humanlog/versions.go +++ b/cmd/humanlog/versions.go @@ -166,7 +166,7 @@ func checkForUpdate(ctx context.Context, cfg *config.Config, state *state.State) updateClient := cliupdatev1connect.NewUpdateServiceClient(httpClient, apiURL) res, err := updateClient.GetNextUpdate(ctx, connect.NewRequest(&cliupdatepb.GetNextUpdateRequest{ - ProjectName: "apictl", // "humanlog", + ProjectName: "humanlog", CurrentVersion: version, MachineArchitecture: runtime.GOARCH, MachineOperatingSystem: runtime.GOOS, diff --git a/internal/pkg/state/state.go b/internal/pkg/state/state.go index 653dbe6f..2988aa5e 100644 --- a/internal/pkg/state/state.go +++ b/internal/pkg/state/state.go @@ -118,5 +118,11 @@ func (cfg State) populateEmpty(other *State) *State { if out.MachineID == nil && other.MachineID != nil { out.MachineID = other.MachineID } + if out.LatestKnownVersion == nil && other.LatestKnownVersion != nil { + out.LatestKnownVersion = other.LatestKnownVersion + } + if out.LastestKnownVersionUpdatedAt == nil && other.LastestKnownVersionUpdatedAt != nil { + out.LastestKnownVersionUpdatedAt = other.LastestKnownVersionUpdatedAt + } return &out }