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
Merge origin/main into pr-121, porting the Vagrant cache to data/fixed-dirs.tsv
The monolithic `asimov` is gone as of AsimovMac#126, so the ASIMOV_FIXED_DIRS entry
becomes a row in data/fixed-dirs.tsv, placed in the file's alphabetical
order rather than appended. Test, README table and CHANGELOG entry carry
over unchanged.
-`asimov doctor` now checks the data files and reports how many sentinels and fixed directories are loaded, so an incomplete install is diagnosed rather than just failing.
16
+
15
17
### Changed
16
18
19
+
-**Asimov is no longer a single file.** The launcher lives at `bin/asimov`, the logic in `lib/asimov/*.sh`, and the directory lists in `data/*.tsv`. Installed, those become `<prefix>/bin/asimov`, `<prefix>/libexec/asimov/` and `<prefix>/share/asimov/`. Behaviour is unchanged; every existing test passes untouched.
20
+
- Sentinels, fixed directories and skip paths are now tab-separated data files instead of bash arrays. Each record carries its ecosystem or owning tool as a real field, so adding a pattern is a one-line edit with no bash syntax involved.
21
+
- The remote installer (`scripts/install-remote.sh`) downloads a tarball instead of a single script, and installs under `~/.local`.
22
+
- Release assets are now `asimov-<version>.tar.gz` rather than a bare `asimov` script.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+40-9Lines changed: 40 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,20 +58,22 @@ The main script supports `--help`, `--version`, `--dry-run`, `--verbose`, and `-
58
58
59
59
## Adding a new dependency pattern
60
60
61
-
This is the most common type of contribution. To add a new ecosystem or dependency directory:
61
+
This is the most common type of contribution, and it needs no bash: sentinels live in a data file.
62
62
63
-
1.**Add the sentinel pair** to the `ASIMOV_VENDOR_DIR_SENTINELS` array in [`asimov`](asimov) — one `'directory sentinel'` entry per pattern.
64
-
2.**Add a test** in [`tests/sentinels.bats`](tests/sentinels.bats) using `create_project` to build the fixture. Keep this file in sync with `ASIMOV_VENDOR_DIR_SENTINELS` (one test per sentinel pair).
63
+
1.**Add a row** to [`data/sentinels.tsv`](data/sentinels.tsv) — one per pattern, fields separated by a **tab**.
64
+
2.**Add a test** in [`tests/sentinels.bats`](tests/sentinels.bats) using `create_project` to build the fixture. Keep this file in sync with `data/sentinels.tsv` (one test per row).
65
65
3.**Run `make check`** to verify your changes pass tests and linting.
66
66
4.**Add a changelog entry** under the `[Unreleased]` section in [`CHANGELOG.md`](CHANGELOG.md).
This means: exclude `.zig-cache/` only when `build.zig` exists in the same directory.
74
+
This means: exclude `.zig-cache/` only when `build.zig` exists in the same directory. Glob metacharacters are allowed in the sentinel, e.g. `DerivedData *.xcodeproj`.
75
+
76
+
The same applies to global caches ([`data/fixed-dirs.tsv`](data/fixed-dirs.tsv)) and skipped directories ([`data/skip-paths.tsv`](data/skip-paths.tsv)). Paths in those two are **relative to the home directory** — write `.npm/_cacache`, not `~/.npm/_cacache`.
75
77
76
78
## Commit conventions
77
79
@@ -105,10 +107,28 @@ type(scope): short description
105
107
## Project structure
106
108
107
109
```
108
-
asimov # Main bash script
110
+
bin/asimov # Launcher: finds the library and data, then runs it
111
+
lib/asimov/
112
+
bootstrap.sh # Colours, constants, root and state-path resolution
113
+
config.sh # ~/.config/asimov/config
114
+
data.sh # Loaders for the data/ entities
115
+
cache.sh # ~/.cache/asimov state and the path cache
116
+
scan.sh # Which dirs to scan, and the find expression
117
+
discover.sh # Spotlight top-up on a cached run
118
+
exclude.sh # tmutil addexclusion, with its filters
119
+
report.sh # Usage, size formatting, run summary
120
+
prune.sh # The prune subcommand
121
+
doctor.sh # The doctor subcommand
122
+
main.sh # Argument parsing and dispatch
123
+
data/
124
+
sentinels.tsv # Directory + sentinel pairs
125
+
fixed-dirs.tsv # Global tool caches, always excluded
126
+
skip-paths.tsv # Directories never descended into
109
127
tests/
110
128
sentinels.bats # Tests for each dependency pattern
111
129
behavior.bats # Tests for edge cases and general behavior
130
+
cache.bats # Tests for the path cache
131
+
doctor.bats # Tests for the doctor subcommand
112
132
format.bats # Unit tests for format_size_kb()
113
133
plist.bats # Tests for the LaunchAgent plist
114
134
test_helper.bash # Shared setup/teardown and assertions
Installs `v0.10.0`to `~/.local/bin`. Found a bug? [Open an issue](https://github.com/AsimovMac/asimov/issues).
33
+
Installs to `~/.local` (`bin/asimov`, plus its library and data files under `libexec/` and `share/`). Found a bug? [Open an issue](https://github.com/AsimovMac/asimov/issues).
0 commit comments