--force reparieren, Tests ergänzen, Aufräumen
- --force erlaubt jetzt tatsächlich das Downgrade auf Stable/Beta (der Downgrade-Block war vorher unerreichbar) - test.sh: Tests für cmp_versions und die Update-Entscheidung (gefakete curl/ollama, kein Netz nötig) - --help: stdout + Exit 0; unbekannte Argumente werden benannt - tote Zeilen entfernt (nullglob, basename-Zeremonie) - README: Nummerierung und nullglob-Erwähnung korrigiert
This commit is contained in:
1 parent
bca72afbe8
commit
2aa9b70b29
4 files changed
+124
-14
No files matched your search
@@ -37,7 +37,8 @@ bash -euo pipefail ollama-update --help
|
||||
|
||||
## Structure
|
||||
|
||||
- `ollama-update` — main script (executable, bash, ~240 lines)
|
||||
- `ollama-update` — main script (executable, bash, ~270 lines)
|
||||
- `test.sh` — self-test for version compare and update decision (no network, no install)
|
||||
- `README.md` — usage docs
|
||||
|
||||
## Key behaviors
|
||||
@@ -50,7 +51,12 @@ bash -euo pipefail ollama-update --help
|
||||
|
||||
## Testing
|
||||
|
||||
No formal test suite. Manual verification:
|
||||
```bash
|
||||
# Unit + integration tests (fake curl/ollama, no network, no install)
|
||||
./test.sh
|
||||
```
|
||||
|
||||
Manual verification:
|
||||
|
||||
```bash
|
||||
# Dry-run version checks (no install)
|
||||
@@ -60,7 +66,7 @@ No formal test suite. Manual verification:
|
||||
|
||||
## Gotchas
|
||||
|
||||
- Script uses `set -euo pipefail` and `nullglob` — preserve these
|
||||
- Script uses `set -euo pipefail` — preserve this
|
||||
- GitHub API rate limits: unauthenticated = 60 req/hr
|
||||
- Beta channel compares against stable; only updates if beta > stable AND beta > local
|
||||
- Temp install script cleaned via `trap` on EXIT
|
||||
Reference in new issue
Block a user