@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/dist/brains-ops.js +173 -173
- package/dist/index.js +182 -182
- package/package.json +1 -1
- package/templates/rover-pilot/.github/workflows/deploy.yml +11 -14
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
|
|
323
|
-
|
|
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
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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
|