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
Copy file name to clipboardExpand all lines: CLAUDE.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@ test/
28
28
## Key Design Decisions
29
29
30
30
-**Eager registration:** Decoration provider is registered before repo scanning completes. The git extension may not have discovered repositories when we activate (`onStartupFinished`), so gating on repo state causes missed decorations.
31
-
-**PATH augmentation:** The VSCode extension host has a minimal PATH. `src/extension.ts` appends `/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin` to `process.env.PATH` on the shared extension host so `git-crypt` is discoverable by all extensions (including the built-in git extension's clean/smudge filter invocations). This is the extension's primary function.
31
+
-**PATH augmentation:** The VSCode extension host has a minimal PATH. `src/extension.ts` appends `/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin`, and the bundled `bin/` directory to `process.env.PATH` on the shared extension host so `git-crypt` is discoverable by all extensions (including the built-in git extension's clean/smudge filter invocations). User-installed git-crypt takes precedence; the bundled binary is appended last. This is the extension's primary function.
32
+
-**Bundled binary:** Platform-specific VSIX files ship a statically linked git-crypt binary (macOS arm64, Linux x64/arm64). A universal VSIX (no binary) is also published for unsupported platforms. The binary version is pinned in `git-crypt-version.txt` with a sha256 checksum.
32
33
-**Unlock detection via key directory:**`isRepoUnlocked()` checks for `.git/git-crypt/keys/` existence rather than parsing `git-crypt status` output (which is slow on large repos and ambiguous -- it labels managed files as "encrypted:" even when unlocked).
33
34
-**No shell execution:** All git commands use `execFile` with array arguments to prevent command injection.
34
35
@@ -45,11 +46,13 @@ Tests create a temporary git-crypt repo via `test/fixture.ts` (requires `git-cry
45
46
1.**preversion** -- branch guard (must be on `main`), build, test
46
47
2. Version bump, commit, `v*` tag
47
48
3.**postversion** -- pushes commit + tag to origin
Recovery from CI failure: `npm run retag` (force-moves tag to HEAD, re-triggers CI).
51
+
Recovery from CI failure: `npm run retag` (force-moves tag to HEAD, re-triggers CI). If marketplace publish fails after GH release succeeds, bump version and release again (marketplace rejects same-version re-publishes).
51
52
52
-
Branches: `main` (releases), `dev` (test-only CI, no publish).
53
+
Dry runs: `gh workflow run ci.yml --ref dev` runs the full build/package pipeline with `dry_run=true` (default). Marketplace publish is also guarded against non-main branches.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+27-8Lines changed: 27 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,29 +54,48 @@ This single command:
54
54
55
55
CI then takes over:
56
56
57
-
5. Runs tests on the pushed tag
58
-
6. Validates the tag matches package.json version
59
-
7. Packages the VSIX and creates a GitHub release with it attached
60
-
8. Publishes to the VS Code Marketplace
57
+
5. Runs tests
58
+
6. Validates the tag is on `main` and matches package.json version
59
+
7. Builds static git-crypt binaries for macOS (arm64) and Linux (x64, arm64)
60
+
8. Packages platform-specific VSIX files (with bundled binary) and a universal VSIX (without)
61
+
9. Creates a GitHub release with all VSIX files attached
62
+
10. Publishes all VSIX files to the VS Code Marketplace
63
+
64
+
### Dry Runs
65
+
66
+
Trigger the full build/package pipeline without publishing:
67
+
68
+
```bash
69
+
gh workflow run ci.yml --ref dev
70
+
```
71
+
72
+
This runs with `dry_run=true` (the default), which builds binaries, packages VSIX files, and verifies their contents -- but skips the GitHub release and marketplace publish steps. Uncheck `dry_run` in the GitHub UI to publish from a manual dispatch (only allowed from `main`).
61
73
62
74
### Recovery
63
75
64
-
If CI fails after the tag is pushed (e.g. marketplace timeout), fix the issue and retag:
76
+
**CI fails before publish** (tests, build, packaging): fix the issue and retag:
65
77
66
78
```bash
67
79
npm run retag
68
80
```
69
81
70
82
This force-moves the tag to the current commit and pushes it, re-triggering CI.
71
83
84
+
**Marketplace publish fails after GitHub release succeeds**: the marketplace rejects same-version re-publishes, so `retag` alone won't work. Bump the version and release again:
85
+
86
+
```bash
87
+
npm version patch
88
+
```
89
+
72
90
### Branches
73
91
74
92
-**main** -- releases happen here; `npm version` enforces this via a branch guard
75
-
-**dev** -- CI runs tests only; publish job verifies the tag is on main before proceeding
93
+
-**dev** -- CI runs tests and dry-run builds; publish steps are gated behind `dry_run` input and a main-branch guard
76
94
77
95
## CI
78
96
79
97
GitHub Actions (`.github/workflows/ci.yml`):
80
98
81
-
-**test** job runs on every push to `main`/`dev` and on PRs to `main`
82
-
-**publish** job runs only on `v*` tags on `main`, after tests pass
99
+
-**test** -- runs on every push to `main`/`dev` and on PRs to `main`
100
+
-**build-git-crypt** -- compiles static git-crypt binaries on macOS (arm64 via macos-15) and Linux (x64 and arm64 via Alpine Docker, arm64 uses QEMU). Runs on tags and `workflow_dispatch`
101
+
-**publish** -- packages platform-specific and universal VSIX files, verifies contents, optionally creates GitHub release and publishes to marketplace. Release/publish steps are controlled by the `dry_run` input (defaults to true on manual dispatch; always false on tag pushes)
0 commit comments