Skip to content

Commit 3d23be4

Browse files
committed
Update README and skill install guidance
1 parent 6dffdca commit 3d23be4

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.skills/swift-git/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ Examples (do not auto-run)
6969
- "Run a single test": use `swift test --filter <TestName>` as shown above.
7070
- "Check package manifest": open Package.swift at repository root.
7171

72+
Installation (SwiftPM)
73+
- Base library:
74+
- Product: `SwiftGit`
75+
- Optional embedded git bundles (manual opt-in):
76+
- Arm64 bundle product: `SwiftGitArm64`
77+
- X86_64 bundle product: `SwiftGitX86_64`
78+
- Universal bundle product: `SwiftGitUniversal`
79+
- Usage pattern (prefer embedded, fallback to system):
80+
- `Git(environments: [.embed(.arm64), .system])`
81+
- Replace `.arm64` with `.x86_64` or `.universal` when using the corresponding product.
82+
7283
Packaging the skill
7384
- To package this skill (manual step), follow your environment's packaging script. Example: `scripts/package_skill.py swift-git.skill` (if package exists in your environment).
7485

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,13 @@ Embedded git bundle
100100
- `SwiftGit` (base product) no longer embeds a bundle; `.embed(.arm64/.x86_64/.universal)` works only when the corresponding resource product is linked.
101101
- `GitEnvironment.Style.auto` now maps to system git only; use `.embed(...)` explicitly when you add a resource product.
102102

103-
Example usage (arm64):
103+
Example usage (arm64, prefer embedded then system fallback):
104104

105105
```swift
106106
import SwiftGit
107-
import SwiftGitResourcesArm64
107+
import SwiftGitArm64
108108

109-
let env = try GitEnvironment(type: .embed(.arm64))
110-
let git = Git(environment: env)
109+
let git = Git(environments: [.embed(.arm64), .system])
111110
```
112111
- Agents and tests should not modify files under the bundles. Use `GitEnvironment.Style.custom(URL)` to point to an alternate git distribution.
113112
- To generate updated bundles, run `tools/update-git-bundle.sh` with the desired `--archs` and copy the result into the corresponding `Sources/SwiftGitResources*/Resource/` directory.

0 commit comments

Comments
 (0)