Skip to content

Commit c493cbe

Browse files
committed
improvement(library): link Andrew's author profile and surface the docs history fetch outcome in build logs
1 parent 360c326 commit c493cbe

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/docs/scripts/fetch-git-history.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { execFileSync } from 'node:child_process'
1111
import { createLogger } from '@sim/logger'
1212
import { getErrorMessage } from '@sim/utils/errors'
1313

14-
const logger = createLogger('DocsGitHistory')
14+
/** A build step's outcome belongs in the build log, which the production default (errors only) would hide. */
15+
const logger = createLogger('DocsGitHistory', { logLevel: 'INFO' })
1516

1617
/** Bounds the fetch so a stalled remote costs at most this much of the deployment, never all of it. */
1718
const FETCH_TIMEOUT_MS = 120_000
@@ -29,6 +30,8 @@ if (process.env.VERCEL) {
2930
if (git(['rev-parse', '--is-shallow-repository']) === 'true') {
3031
git(['fetch', '--unshallow', '--filter=blob:none', '--no-tags', 'origin'], FETCH_TIMEOUT_MS)
3132
logger.info('Fetched full commit history for docs last-modified dates')
33+
} else {
34+
logger.info('Clone already has full commit history')
3235
}
3336
} catch (error) {
3437
logger.warn(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"id": "andrew",
33
"name": "Andrew Caslow",
4+
"url": "https://www.linkedin.com/in/andrewcaslow/",
45
"avatarUrl": "/authors/andrew.jpg"
56
}

0 commit comments

Comments
 (0)