diff --git a/CLAUDE.md b/CLAUDE.md index e01bd9f..9ef9bb7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co A language-agnostic dependency manager for git repositories (Go, single binary) — a replacement for git submodules. Users declare deps in `graft.toml`, graft resolves them go.mod-style (tags or pseudo-versions) and pins exact commit SHAs plus content hashes in `graft.lock`; `graft apply` reconciles the vendor directory to match the lockfile exactly. -**Current status: Milestones 1–4 implemented** — the full CLI (`init`/`add`/`remove`/`apply`/`lock`/`status`/`cache`), parallel apply, the per-project advisory lock, golden output tests, the release pipeline (`.goreleaser.yaml`, `install.sh`), and the global cache layer: the shared bare-repo cache (`internal/repocache`), the content-addressed store (`internal/store`, with reflink + `graft cache verify`/`prune`/`clean`), and link mode (`GRAFT_LINK_MODE`, registered in `internal/links`). Milestone 5 (ecosystem docs) is mostly done — the README already has CI usage examples (GitHub Actions, GitLab CI) and a comparison section; the documentation site remains unbuilt. The release pipeline is proven end-to-end (T3.4 done): `v0.0.1-beta.1` through `v0.0.1-beta.6` are published with multi-platform artifacts + `SHA256SUMS`. The project intentionally stays on a 0.x cadence (v0.0.1, v0.0.2, …) until it is very stable before cutting v1, so breaking changes are still permitted pre-1.0. Homebrew packaging is dropped for now — script install only. The source of truth is the design spec: the normative design (§1–§9) lives in the version-controlled `docs/design.zh-TW.md` (authoritative) with an English translation in `docs/design.md` — read it before implementing anything. Docs that must stay consistent with the spec: `docs/design.md` (English translation — keep in sync with the zh-TW doc), `docs/requirements.md` (the traceability matrix — see below), `docs/testing.md` (black-box testing manual), `README.md`, `README.zh-TW.md`. When changing behavior or design, update all of them. +**Current status: Milestones 1–4 implemented** — the full CLI (`init`/`add`/`remove`/`apply`/`lock`/`status`/`cache`), parallel apply, the per-project advisory lock, golden output tests, the release pipeline (`.goreleaser.yaml`, `install.sh`), and the global cache layer: the shared bare-repo cache (`internal/repocache`), the content-addressed store (`internal/store`, with reflink + `graft cache verify`/`prune`/`clean`), and link mode (`GRAFT_LINK_MODE`, registered in `internal/links`). Milestone 5 (ecosystem docs) is mostly done — the README already has CI usage examples (GitHub Actions, GitLab CI) and a comparison section; the documentation site remains unbuilt. The release pipeline is proven end-to-end (T3.4 done): `v0.0.1-beta.1` through `v0.0.1-beta.7` are published with multi-platform artifacts + `SHA256SUMS`. The project intentionally stays on a 0.x cadence (v0.0.1, v0.0.2, …) until it is very stable before cutting v1, so breaking changes are still permitted pre-1.0. Homebrew packaging is dropped for now — script install only. The source of truth is the design spec: the normative design (§1–§9) lives in the version-controlled `docs/design.zh-TW.md` (authoritative) with an English translation in `docs/design.md` — read it before implementing anything. Docs that must stay consistent with the spec: `docs/design.md` (English translation — keep in sync with the zh-TW doc), `docs/requirements.md` (the traceability matrix — see below), `docs/testing.md` (black-box testing manual), `README.md`, `README.zh-TW.md`. When changing behavior or design, update all of them. Spec ↔ implementation conformance is machine-enforced by two tests: - `internal/clierr/spec_test.go` binds the §4.6 exit-code table in both design docs to the `clierr` constants; it fails if spec and implementation (or the two translations) drift. diff --git a/README.md b/README.md index 80aa562..03a73c2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ $ graft apply /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/min0625/graft/main/script/install.sh)" ``` -Auto-detects OS and architecture (Linux/macOS, x86_64/arm64), installs to `~/.local/bin`. Override with `GRAFT_INSTALL_DIR` or pin a version with `GRAFT_VERSION=v0.0.1-beta.1` (any tag on the [releases page](https://github.com/min0625/graft/releases)). +Auto-detects OS and architecture (Linux/macOS, x86_64/arm64), installs to `~/.local/bin`. Override with `GRAFT_INSTALL_DIR` or pin a version with `GRAFT_VERSION=v0.0.1` (any tag on the [releases page](https://github.com/min0625/graft/releases)). **Windows (PowerShell)** @@ -55,7 +55,7 @@ Auto-detects OS and architecture (Linux/macOS, x86_64/arm64), installs to `~/.lo irm https://raw.githubusercontent.com/min0625/graft/main/script/install.ps1 | iex ``` -Installs to `$HOME\.local\bin`. Override with `$env:GRAFT_INSTALL_DIR` or pin a version with `$env:GRAFT_VERSION = 'v0.0.1-beta.1'`. +Installs to `$HOME\.local\bin`. Override with `$env:GRAFT_INSTALL_DIR` or pin a version with `$env:GRAFT_VERSION = 'v0.0.1'`. ### Manual download diff --git a/README.zh-TW.md b/README.zh-TW.md index f3841a5..d9e5111 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -47,7 +47,7 @@ $ graft apply /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/min0625/graft/main/script/install.sh)" ``` -自動偵測 OS 與架構(Linux/macOS、x86_64/arm64),安裝到 `~/.local/bin`。可用 `GRAFT_INSTALL_DIR` 覆寫安裝位置,或用 `GRAFT_VERSION=v0.0.1-beta.1` 釘選版本(可用 [releases 頁面](https://github.com/min0625/graft/releases)上的任一 tag)。 +自動偵測 OS 與架構(Linux/macOS、x86_64/arm64),安裝到 `~/.local/bin`。可用 `GRAFT_INSTALL_DIR` 覆寫安裝位置,或用 `GRAFT_VERSION=v0.0.1` 釘選版本(可用 [releases 頁面](https://github.com/min0625/graft/releases)上的任一 tag)。 **Windows(PowerShell)** @@ -55,7 +55,7 @@ $ graft apply irm https://raw.githubusercontent.com/min0625/graft/main/script/install.ps1 | iex ``` -安裝到 `$HOME\.local\bin`。可用 `$env:GRAFT_INSTALL_DIR` 覆寫,或用 `$env:GRAFT_VERSION = 'v0.0.1-beta.1'` 釘選版本。 +安裝到 `$HOME\.local\bin`。可用 `$env:GRAFT_INSTALL_DIR` 覆寫,或用 `$env:GRAFT_VERSION = 'v0.0.1'` 釘選版本。 ### 手動下載 diff --git a/script/install.ps1 b/script/install.ps1 index 41109e9..d4adabf 100644 --- a/script/install.ps1 +++ b/script/install.ps1 @@ -9,7 +9,7 @@ .EXAMPLE irm https://raw.githubusercontent.com/min0625/graft/main/script/install.ps1 | iex .EXAMPLE - $env:GRAFT_VERSION = 'v0.0.1-beta.1' + $env:GRAFT_VERSION = 'v0.0.1' irm https://raw.githubusercontent.com/min0625/graft/main/script/install.ps1 | iex #> diff --git a/script/install.sh b/script/install.sh index 8dc80e7..12bf84f 100644 --- a/script/install.sh +++ b/script/install.sh @@ -133,7 +133,7 @@ main() { os="$(detect_os)" arch="$(detect_arch)" - # allow pinning version via env: GRAFT_VERSION=v0.0.1-beta.1 + # allow pinning version via env: GRAFT_VERSION=v0.0.1 version="${GRAFT_VERSION:-}" if [[ -z "${version}" ]]; then info "Fetching latest version..."