Commit Graph
16 Commits
Author SHA1 Message Date
David Heinemeier HanssonandClaude Opus 5 fd9c078bf2 Fix nine defects in the push/sync path found in review
The worst was fatal: push passed --skip-prod-check to upload-prebuilt, which
forwards every argument to sign, promote and update as well, and sign rejects
unknown options. Every non-dry-run push and deploy would have uploaded and
verified its artifacts and then failed before signing. upload-prebuilt now
routes publishing flags to sync alone.

The partial-tree guard was weaker than it looked:

  - it counted archive files locally against package names in the remote
    database, and this tree keeps two versions per package, so a checkout with
    a spare version of half the repository could pass while still hiding
    hundreds of packages. It now compares package-name sets and lists what
    would be hidden.
  - it treated any unreadable remote as an empty one, so an auth failure or a
    corrupt database disabled it. Only rclone's "directory not found" now
    counts as a fresh mirror; every other failure aborts.

Also:

  - sync had no set -e, so a failed package upload fell through to publishing
    the database, advertising packages that were never uploaded. Each transfer
    is now checked before the next step.
  - --package with no names silently meant "every package", which under --yes
    could publish everything from one unset variable in a script.
  - push now refuses to run when the host has packages staged from an earlier
    failure, since publishing would sign and promote those too.
  - epoch versions contain a colon, which rsync reads as host:path, so no
    package with an epoch could be transferred. Sources are ./-prefixed.
  - remote paths are quoted for the remote shell.
  - sync spun forever on a missing option value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 03:39:55 -07:00
David Heinemeier HanssonandClaude Opus 5 bf53101bbf Add bin/repo push and stop sync from deleting production
Heavy packages build faster on a local machine, but there was no way to get
the artifacts to the server: bin/upload-prebuilt publishes to the rclone
remote from whatever tree it runs in, so the local -> host hop was manual.

bin/repo push rsyncs build-output artifacts to the host, verifies checksums,
and runs upload-prebuilt over ssh. Signing stays on the host, which is the
only machine with the key and the only one holding a complete repository.

Publishing from a local checkout was worse than merely unsupported. sync ran
rclone sync --delete-after against a tree that pkgs.omarchy.org/ gitignores,
so on any machine that had not run a full release it would have deleted the
production repository -- guarded only by a y/N prompt that --skip-prod-check
turns off. Package uploads are now additive, deletion moves behind --prune,
and sync refuses to publish a database built from a tree holding fewer
packages than the remote already lists.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 03:13:06 -07:00
Ryan Hughes dd98747e2c Avoid R2 HEAD checks during repo sync 2026-06-05 19:11:16 -04:00
Ryan Hughes aca2584c8b Update sync and release to use mirror / arch 2025-11-21 13:20:06 -05:00
David Heinemeier Hansson 44ce28a0d8 Account for multiple subdirectories for syncing 2025-11-21 15:01:59 +01:00
Ryan Hughes 4b5342ba66 Add stable / edge 2025-11-10 11:03:39 -05:00
Ryan Hughes 51a3318b10 Consolidate more helpers 2025-10-27 00:28:46 -04:00
Ryan Hughes 95d1a77659 Overhaul the whole build process 2025-10-26 23:33:22 -04:00
Ryan Hughes de3f952825 Ignore existing 2025-10-26 17:58:27 -04:00
Ryan Hughes ff7dcb352c Don't show progress 2025-10-23 00:57:35 -04:00
Ryan Hughes 9202b56a88 Updates 2025-09-12 21:52:49 -04:00
Ryan Hughes 6df79d32d9 Change sync order 2025-09-07 23:06:43 +02:00
Ryan Hughes c57c9620de Lots of cleanup 2025-08-28 19:44:01 +03:00
Ryan Hughes c5f7c41b3b Bin cleanup 2025-08-28 19:14:28 +03:00
Ryan Hughes 0735958154 Clean up syncing 2025-08-28 19:13:04 +03:00
Ryan Hughes e00a529ba9 Probably should have committed a long time ago... 2025-08-25 05:45:19 +02:00