Skip to content

Commit

Permalink
fix: remove useless check in upgrade command (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Jun 22, 2023
1 parent 85ef909 commit 3b3b497
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/cli-tools/src/releaseChecker/getLatestRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ export default async function getLatestRelease(
logger.debug(`Cached release version: ${cachedLatest}`);
}

const aWeek = 7 * 24 * 60 * 60 * 1000;
const lastChecked = cacheManager.get(name, 'lastChecked');
const now = new Date();
if (lastChecked && Number(now) - Number(new Date(lastChecked)) < aWeek) {
logger.debug('Cached release is still recent, skipping remote check');
return;
}

logger.debug('Checking for newer releases on GitHub');
const eTag = cacheManager.get(name, 'eTag');
const {stable, candidate} = await getLatestRnDiffPurgeVersion(name, eTag);
Expand Down

0 comments on commit 3b3b497

Please sign in to comment.