Rename wsl-infra to host-infra
The directory covers cross-host operations (mac15, mac13, WSL, Aliyun), not just WSL. Update the backup script's archive paths, README commands, and AGENTS/README references; the remote ops-backups directory name stays unchanged.
This commit is contained in:
1 parent
35f761e8a0
commit
7fe5cae62c
9 files changed
+12
-12
No files matched your search
@@ -111,7 +111,7 @@ Recent commits use concise imperative subjects, often `Add ...` or `Refine ...`,
|
||||
git push origin refs/tags/vX.Y.Z
|
||||
```
|
||||
- GitHub Actions (`release.yml`) is responsible only for cross-compiling all 5 target binaries and publishing the GitHub Release.
|
||||
- **Gitea Pull-Based Promotion & Mirroring**: On WSL (`wsl-dev`), `seal-use-release-sync.timer` polls GitHub every 15 minutes (or can be triggered immediately via `systemctl start seal-use-release-sync.service`), mirrors Git repository refs (branches and tags) and pulls release assets into Gitea (`wsl-infra/systemd/`).
|
||||
- **Gitea Pull-Based Promotion & Mirroring**: On WSL (`wsl-dev`), `seal-use-release-sync.timer` polls GitHub every 15 minutes (or can be triggered immediately via `systemctl start seal-use-release-sync.service`), mirrors Git repository refs (branches and tags) and pulls release assets into Gitea (`host-infra/systemd/`).
|
||||
- The workflow enforces the merge-before-tag rule rather than trusting the operator: `release.yml` refuses to publish unless the tagged commit is an ancestor of `origin/main`. Actions in both workflows are pinned to commit SHAs rather than moving tags for supply-chain integrity.
|
||||
|
||||
## Security & Configuration Tips
|
||||
|
||||
@@ -354,4 +354,4 @@ bun run bump 0.8.5
|
||||
**CI & Promotion Pipeline:**
|
||||
- GitHub Actions triggers automatically upon pushing a `v*` tag to `origin`;
|
||||
- Cross-compiles standalone binaries for 5 target platforms (macOS Apple Silicon/Intel, Linux x86_64/ARM64, Windows x64) and publishes them to **[GitHub Releases](https://github.com/yunyingk/seal-use/releases)**;
|
||||
- WSL `seal-use-release-sync.timer` polls the latest GitHub Release and promotes all assets to **[Gitea Releases](https://git.ying-qing.cn/gitea/seal-use/releases)** (`wsl-infra/README.md`).
|
||||
- WSL `seal-use-release-sync.timer` polls the latest GitHub Release and promotes all assets to **[Gitea Releases](https://git.ying-qing.cn/gitea/seal-use/releases)** (`host-infra/README.md`).
|
||||
@@ -42,7 +42,7 @@ Credentials are stored as `0600` files under
|
||||
From mac15, run:
|
||||
|
||||
```sh
|
||||
./ops/infra-healthcheck.sh
|
||||
./host-infra/infra-healthcheck.sh
|
||||
```
|
||||
|
||||
It emits JSON checks for mac15, the Mac15-to-WSL Tailscale/SSH path, WSL,
|
||||
@@ -52,16 +52,16 @@ does not restart or mutate any service.
|
||||
|
||||
## Workspace backups
|
||||
|
||||
The repository is the source of truth. After the ops changes are committed to
|
||||
`main`, back up the tracked `ops/` directory to each machine's global workspace:
|
||||
The repository is the source of truth. After the host-infra changes are committed to
|
||||
`main`, back up the tracked `host-infra/` directory to each machine's global workspace:
|
||||
|
||||
```sh
|
||||
./ops/backup-workspace-scripts.sh
|
||||
./host-infra/backup-workspace-scripts.sh
|
||||
```
|
||||
|
||||
Each run creates a commit-named snapshot under
|
||||
`~/Workspace/ops-backups/seal-use/` on mac15 and mac13, and under
|
||||
`~/workspace/ops-backups/seal-use/` on WSL and Aliyun. Each snapshot includes a
|
||||
manifest with its source commit and backup time. Only tracked `ops/` files are
|
||||
manifest with its source commit and backup time. Only tracked `host-infra/` files are
|
||||
copied; private runtime configuration and credentials are excluded. Run the
|
||||
backup command again after changing operational scripts or service templates.
|
||||
@@ -2,8 +2,8 @@
|
||||
set -uo pipefail
|
||||
|
||||
repo_root=$(git rev-parse --show-toplevel)
|
||||
if [ -n "$(git -C "$repo_root" status --porcelain -- ops)" ]; then
|
||||
echo "Refusing to back up uncommitted ops files; commit them first." >&2
|
||||
if [ -n "$(git -C "$repo_root" status --porcelain -- host-infra)" ]; then
|
||||
echo "Refusing to back up uncommitted host-infra files; commit them first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -12,7 +12,7 @@ snapshot="commit-$commit"
|
||||
stage=$(mktemp -d)
|
||||
trap 'rm -rf "$stage"' EXIT
|
||||
|
||||
git -C "$repo_root" archive --format=tar HEAD ops | tar -xf - -C "$stage"
|
||||
git -C "$repo_root" archive --format=tar HEAD host-infra | tar -xf - -C "$stage"
|
||||
printf 'source_commit=%s\ncreated_at_utc=%s\n' \
|
||||
"$(git -C "$repo_root" rev-parse HEAD)" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
||||
> "$stage/BACKUP-MANIFEST.txt"
|
||||
@@ -27,9 +27,9 @@ sync_remote() {
|
||||
local host="$1" relative_target="$2"
|
||||
if ssh -o BatchMode=yes -o ConnectTimeout=8 "$host" \
|
||||
"mkdir -p '$relative_target' && find '$relative_target' -type f -name '._*' -delete" \
|
||||
&& scp -q -r "$stage/ops" "$stage/BACKUP-MANIFEST.txt" "$host:$relative_target/" \
|
||||
&& scp -q -r "$stage/host-infra" "$stage/BACKUP-MANIFEST.txt" "$host:$relative_target/" \
|
||||
&& ssh -o BatchMode=yes -o ConnectTimeout=8 "$host" \
|
||||
"test -s '$relative_target/BACKUP-MANIFEST.txt' && test -f '$relative_target/ops/README.md'"; then
|
||||
"test -s '$relative_target/BACKUP-MANIFEST.txt' && test -f '$relative_target/host-infra/README.md'"; then
|
||||
printf 'ok\t%s\t%s\n' "$host" "$relative_target"
|
||||
return 0
|
||||
fi
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user