You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Move steady-state shdeps auto-update ownership into `shdeps update` so
callers do not have to duplicate bootstrap repair logic. The automatic
path is quiet, best-effort, and TTL-gated, while explicit `self-update`
remains immediate and status-bearing.
This keeps the current dotfiles repair bridge useful for rollout, but
makes shdeps own the long-term policy once the new release has
propagated across the fleet.
Details
- run the existing release-archive and source-checkout self-update
building blocks before dependency updates when the self-update stamp is
stale
- preserve force/reinstall semantics so `--force`, `SHDEPS_FORCE=1`, and
reinstall bypass the self-update TTL
- stamp release attempts before GitHub I/O so transient GitHub failures
do not cause every fleet update to retry immediately
- stamp source checkout attempts only after a real pull attempt, so
dirty checkouts can be cleaned and updated on the next run
- pass the sourced wrapper directory as `SHDEPS_DIR` for `shdeps_update`
and `shdeps_self_update`, preserving the "update what I sourced"
contract
- document `SHDEPS_SELF_UPDATE_TTL` and the bootstrap/update ownership
boundary
Testing
- `cargo fmt --all --check`
- `cargo clippy --locked --all-targets -- -D warnings`
- `RUSTDOCFLAGS='-D missing-docs' cargo doc --locked --no-deps`
- `cargo test --locked`
- `cargo test --test cli`
- `tests/shell/install-sh-test`
- `tests/shell/installer-flow-test`
- `tests/shell/lua-api-test`
- `tests/shell/lua-bootstrap-test`
- `tests/shell/release-scripts-test`
- `SHDEPS_RUST_CLI=target/release/shdeps
tests/shell/shdeps-wrapper-test`
- `shellcheck install.sh shdeps.sh tests/shell/install-sh-test
tests/shell/installer-flow-test tests/shell/lua-api-test
tests/shell/lua-bootstrap-test tests/shell/release-scripts-test
tests/shell/helpers.sh scripts/package-release.sh scripts/release.sh
scripts/release-tag.sh scripts/release-version.sh
scripts/smoke-install-bash32.sh scripts/smoke-release.sh
examples/hooks.d/example-hook.sh demo/record.sh`
- `git diff --check`
Skipped locally
- CI's Linux musl release package smoke setup requires `rustup`, which
is not available on this host. The release/script smoke suites were run
locally; CI will exercise the musl package path.
Copy file name to clipboardExpand all lines: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,10 +93,13 @@ The CLI loads all `*.conf` files from `~/.config/shdeps/` (sorted alphabetically
93
93
shdeps self-update
94
94
```
95
95
96
-
Uses TTL-based caching to avoid redundant work. Release installs update from
97
-
the latest matching archive, while source checkouts use `git pull --ff-only`
98
-
and skip updates when the working tree has uncommitted changes (active
99
-
development). Use `--force` to bypass the TTL cache.
96
+
Release installs update from the latest matching archive, while source
97
+
checkouts use `git pull --ff-only` and skip updates when the working tree has
98
+
uncommitted changes (active development). `shdeps update` also performs a
99
+
quiet, best-effort self-check for supported shdeps installs before dependency
100
+
updates. That automatic check is TTL-gated by `SHDEPS_SELF_UPDATE_TTL`; use
101
+
`--force` or `SHDEPS_FORCE=1` with `shdeps update` to bypass the self-update
102
+
TTL.
100
103
101
104
### Uninstalling
102
105
@@ -135,6 +138,7 @@ Use `-` for fields you want to skip. See [examples/deps.conf](examples/deps.conf
135
138
|`SHDEPS_REINSTALL`|`0`| Force reinstall all deps |
136
139
|`SHDEPS_QUIET`|`0`| Suppress non-result output and interactive prompts |
137
140
|`SHDEPS_REMOTE_TTL`|`3600`| Cache TTL in seconds |
141
+
|`SHDEPS_SELF_UPDATE_TTL`|`86400`| Self-update attempt TTL in seconds for `shdeps update`|
138
142
|`SHDEPS_GIT_DEV_DIR`|`~/git`| Dev clone directory used only by `github:repo` deps (prefers `<dir>/<repo>` over a managed clone) |
139
143
|`SHDEPS_INSTALL_DIR`|`~/.local/share`| Base directory for shdeps-owned install roots (`github:repo`, archive-style `github:release`, `cargo`, `go`, `uv`, `npm`). Raw release binaries install into `SHDEPS_BIN_DIR` instead. |
140
144
|`SHDEPS_BIN_DIR`|`~/.local/bin`| Directory for binary symlinks and raw `github:release` binaries |
@@ -388,7 +392,7 @@ shdeps_update
388
392
389
393
## Bootstrapping (Client Integration)
390
394
391
-
For projects that embed shdeps (e.g., dotfiles managers), `install.sh --bootstrap` provides a single sourceable entry point that handles discovery, sourcing, CLI symlink, and self-update:
395
+
For projects that embed shdeps (e.g., dotfiles managers), `install.sh --bootstrap` provides a single sourceable entry point that handles discovery, sourcing, and CLI symlink setup:
0 commit comments