@rizom/ops 0.2.0-alpha.541 → 0.2.0-alpha.543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rizom/ops",
3
- "version": "0.2.0-alpha.541",
3
+ "version": "0.2.0-alpha.543",
4
4
  "description": "Operator CLI for managing private brain fleet registry repos",
5
5
  "keywords": [
6
6
  "brains",
@@ -303,30 +303,27 @@ jobs:
303
303
  merge-multiple: true
304
304
  path: .
305
305
 
306
- - name: Regenerate users table
307
- run: bunx brains-ops render "$GITHUB_WORKSPACE"
308
-
309
306
  - name: Commit generated config
310
307
  run: |
311
308
  # A newly added user's generated directory is untracked, and
312
309
  # `git diff` cannot see untracked files — without intent-to-add
313
310
  # the new config is silently dropped here and every later deploy
314
311
  # skips that user (their files never appear in a commit range).
315
- git add --intent-to-add -- users views
316
-
317
- if git diff --quiet -- users views; then
318
- exit 0
319
- fi
312
+ git add --intent-to-add -- users
320
313
 
314
+ patch_file="$(mktemp)"
315
+ git diff --binary -- users > "$patch_file"
321
316
  git fetch origin "${{ github.ref_name }}"
322
- if git diff --quiet "origin/${{ github.ref_name }}" -- users views; then
323
- exit 0
317
+ git reset --hard "origin/${{ github.ref_name }}"
318
+ if [ -s "$patch_file" ]; then
319
+ git apply --3way --index "$patch_file"
324
320
  fi
325
321
 
326
- patch_file="$(mktemp)"
327
- git diff --binary -- users views > "$patch_file"
328
- git reset --hard "origin/${{ github.ref_name }}"
329
- git apply --3way --index "$patch_file"
322
+ # views/users.md is generated, and a concurrent deploy may have
323
+ # rewritten it since this run's checkout; render it on fresh main
324
+ # instead of merging a stale copy.
325
+ bunx brains-ops render "$GITHUB_WORKSPACE"
326
+ git add -- views
330
327
 
331
328
  if git diff --cached --quiet -- users views; then
332
329
  exit 0