Add release build targets for hf
This commit is contained in:
45
README.md
45
README.md
@@ -8,12 +8,24 @@
|
||||
go build -o ./bin/hf ./cmd/hf
|
||||
```
|
||||
|
||||
Or use the bundled Makefile:
|
||||
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
To set the version at build time:
|
||||
|
||||
```bash
|
||||
go build -ldflags "-X git.hangman-lab.top/zhi/HarborForge.Cli/internal/commands.Version=1.0.0" -o ./bin/hf ./cmd/hf
|
||||
```
|
||||
|
||||
The Makefile versioned equivalent is:
|
||||
|
||||
```bash
|
||||
make build VERSION=1.0.0
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
@@ -53,13 +65,13 @@ Make sure `~/.local/bin` is on `PATH` before invoking `hf` directly.
|
||||
|
||||
### OpenClaw profile install target
|
||||
|
||||
The planned OpenClaw plugin installer flow will place the binary at:
|
||||
The OpenClaw plugin installer flow places the binary at:
|
||||
|
||||
```text
|
||||
~/.openclaw/bin/hf
|
||||
```
|
||||
|
||||
Until that installer support lands, the equivalent manual install is:
|
||||
If you want the equivalent manual install:
|
||||
|
||||
```bash
|
||||
mkdir -p "$HOME/.openclaw/bin"
|
||||
@@ -100,6 +112,33 @@ hf task list
|
||||
hf task list --token "$HF_TOKEN"
|
||||
```
|
||||
|
||||
## Release Packaging
|
||||
|
||||
Cross-platform release builds are available through the Makefile:
|
||||
|
||||
```bash
|
||||
make release VERSION=1.0.0
|
||||
```
|
||||
|
||||
This produces versioned artifacts in `dist/` using a stable naming pattern:
|
||||
|
||||
```text
|
||||
hf_<version>_<os>_<arch>
|
||||
hf_<version>_<os>_<arch>.exe # Windows
|
||||
```
|
||||
|
||||
Current release targets:
|
||||
- `linux/amd64`
|
||||
- `linux/arm64`
|
||||
- `darwin/amd64`
|
||||
- `darwin/arm64`
|
||||
- `windows/amd64`
|
||||
|
||||
Examples:
|
||||
- `dist/hf_1.0.0_linux_amd64`
|
||||
- `dist/hf_1.0.0_darwin_arm64`
|
||||
- `dist/hf_1.0.0_windows_amd64.exe`
|
||||
|
||||
## Package Layout
|
||||
|
||||
```text
|
||||
@@ -189,5 +228,5 @@ There is not yet a finer-grained exit-code taxonomy; callers should currently tr
|
||||
### Pending
|
||||
|
||||
- Backend code-based endpoint support (some commands still use id-based API routes)
|
||||
- Cross-platform binary packaging / release pipeline
|
||||
- Release automation beyond local `make release` packaging (checksums / archives / CI publishing)
|
||||
- Integration tests
|
||||
|
||||
Reference in New Issue
Block a user