Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add upgrade check #1444

Merged
merged 23 commits into from
Jul 17, 2023
Merged

feat: add upgrade check #1444

merged 23 commits into from
Jul 17, 2023

Conversation

marvinhagemeister
Copy link
Collaborator

@marvinhagemeister marvinhagemeister commented Jul 10, 2023

This PR adds an upgrade check to notify users of a Fresh version. The check is done once per day.

This is how it looks like.

Screenshot 2023-07-07 at 16 55 28

src/server/update_check.ts Outdated Show resolved Hide resolved
@marvinhagemeister marvinhagemeister force-pushed the update_check branch 3 times, most recently from a06d7ec to a75b59f Compare July 10, 2023 15:21
src/server/update_check.ts Outdated Show resolved Hide resolved
tests/cli_update_check_test.ts Show resolved Hide resolved
tests/fixture_update_check/mod.ts Outdated Show resolved Hide resolved
src/server/update_check.ts Outdated Show resolved Hide resolved
src/server/update_check.ts Outdated Show resolved Hide resolved
src/server/mod.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Few nits.

.github/workflows/post_publish.yml Outdated Show resolved Hide resolved
docs/canary/concepts/updating.md Outdated Show resolved Hide resolved
docs/canary/concepts/updating.md Outdated Show resolved Hide resolved
src/dev/mod.ts Outdated Show resolved Hide resolved
src/dev/update_check.ts Outdated Show resolved Hide resolved
tests/cli_update_check_test.ts Show resolved Hide resolved
src/dev/update_check.ts Outdated Show resolved Hide resolved
import { colors, dirname, join } from "./deps.ts";

interface CheckFile {
last_checked: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this being a Date or even just a number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would we gain by changing it? This is an update check and this file isn't used for anything else. Benefits of keeping this an ISO string is that it's human readable.

src/dev/update_check.ts Outdated Show resolved Hide resolved
tests/cli_update_check_test.ts Outdated Show resolved Hide resolved
src/dev/update_check.ts Outdated Show resolved Hide resolved
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marvinhagemeister marvinhagemeister dismissed iuioiua’s stale review July 17, 2023 13:49

applied suggestions.

@marvinhagemeister marvinhagemeister merged commit f12c96e into main Jul 17, 2023
@marvinhagemeister marvinhagemeister deleted the update_check branch July 17, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants