Skip to content

Commit b54cb52

Browse files
committed
ci(repo): overlay HEAD's ui build wiring onto baseline worktree
snapi's baseline worktree checks out the PR's base branch but uses HEAD's snapi config. When a watched package's build:declarations task is added in the same PR that starts watching it, the baseline tree doesn't yet have the task and the fallback build fails. Copy ui's package.json and tsconfig.declarations.json from HEAD into the worktree before installing, matching the existing pattern for snapi.config.json.
1 parent 14a0a3c commit b54cb52

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/api-changes.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ jobs:
131131
mkdir -p .worktrees
132132
git worktree add .worktrees/snapi-baseline "origin/${GITHUB_BASE_REF}"
133133
cp snapi.config.json .worktrees/snapi-baseline/snapi.config.json
134+
# Overlay HEAD's build:declarations wiring for watched packages onto
135+
# the baseline. snapi watches a package set defined by HEAD, so the
136+
# baseline must produce declarations the same way, even if a watched
137+
# package only acquired its build:declarations task in this PR.
138+
cp packages/ui/package.json .worktrees/snapi-baseline/packages/ui/package.json
139+
cp packages/ui/tsconfig.declarations.json .worktrees/snapi-baseline/packages/ui/tsconfig.declarations.json
134140
135141
- name: Install baseline dependencies
136142
if: steps.baseline-cache.outputs.cache-matched-key == ''

0 commit comments

Comments
 (0)