picoclaw/.goreleaser.yaml

183 lines
3.8 KiB
YAML
Raw Normal View History

2026-02-15 01:50:01 +00:00
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
- go mod tidy
- go generate ./...
- go install github.com/tc-hib/go-winres@latest
- go-winres make --in cmd/picoclaw-launcher/winres/winres.json --out cmd/picoclaw-launcher/rsrc --product-version={{ .Version }} --file-version={{ .Version }}
2026-02-15 01:50:01 +00:00
builds:
- id: picoclaw
env:
2026-02-15 01:50:01 +00:00
- CGO_ENABLED=0
tags:
- stdjson
ldflags:
- -s -w
refactor(cli): migrate to Cobra-based command structure (#429) * refactor(cli): migrate to Cobra-based command structure Refactor CLI to use Cobra instead of manual os.Args parsing. - Introduce root command and structured subcommands under cmd/picoclaw/internal - Convert agent, auth, cron, gateway, migrate, onboard, skills, status and version to Cobra commands - Replace manual flag parsing with Cobra flags - Remove direct os.Args usage from command handlers - Keep existing command behavior and output semantics This change focuses on CLI structure and maintainability. No business logic changes intended. * chore(cli): remove version2 alias and make cobra a direct dependency * test(cli): add basic command tests - Add tests for CLI command tree and flag parsing - Align LDFLAGS injection path for version info - Remove unused manual help function * test: migrate command tests to testify assertions Replace standard library testing error checks (t.Error*, t.Fatalf) with assert/require from stretchr/testify across all cobra command tests for improved readability and consistency. * fix(cli): make linter happy * test: avoid duplication in windows config path test * test: simplify allowed command checks using slices.Contains * fix(skills): register subcommands during command construction - Move subcommand registration out of PersistentPreRunE - Ensure `picoclaw skills <subcommand>` resolves correctly - Minor install command and test cleanups * refactor(cli): address review feedback and improve command clarity * fix(authLogoutCmd): rm os.Exit
2026-02-25 07:47:45 +00:00
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.version={{ .Version }}
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.gitCommit={{ .ShortCommit }}
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.buildTime={{ .Date }}
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.goVersion={{ .Env.GOVERSION }}
2026-02-15 01:50:01 +00:00
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm64
- riscv64
- loong64
2026-02-15 01:50:01 +00:00
- arm
- s390x
- mipsle
goarm:
- "6"
- "7"
gomips:
- softfloat
2026-02-15 01:50:01 +00:00
main: ./cmd/picoclaw
ignore:
- goos: windows
goarch: arm
- id: picoclaw-launcher
binary: picoclaw-launcher
env:
- CGO_ENABLED=0
tags:
- stdjson
ldflags:
- -s -w
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm64
- riscv64
- loong64
- arm
- s390x
- mipsle
goarm:
- "6"
- "7"
gomips:
- softfloat
main: ./cmd/picoclaw-launcher
ignore:
- goos: windows
goarch: arm
- id: picoclaw-launcher-tui
binary: picoclaw-launcher-tui
env:
- CGO_ENABLED=0
tags:
- stdjson
ldflags:
- -s -w
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm64
- riscv64
- loong64
- arm
- s390x
- mipsle
goarm:
- "6"
- "7"
gomips:
- softfloat
main: ./cmd/picoclaw-launcher-tui
ignore:
- goos: windows
goarch: arm
dockers_v2:
- id: picoclaw
chore(docker): reorganize docker files and add first-run entrypoint (#812) * chore(docker): move Dockerfile into docker/ directory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(docker): add entrypoint script to goreleaser Dockerfile - entrypoint.sh: on first run (config and workspace both absent) runs picoclaw onboard then exits for the user to configure; subsequent starts exec picoclaw gateway directly - Dockerfile.goreleaser: copy and use entrypoint.sh, run as root - .goreleaser.yaml: update dockerfile path, add entrypoint.sh to extra_files so it is included in the docker build context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(docker): update docker-compose to use pre-built image and bind mount - Use docker.io/sipeed/picoclaw:latest instead of building locally - Replace named volume with bind mount ./data:/root/.picoclaw - Move docker-compose.yml into docker/ directory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update Docker Compose section to reflect new docker/ layout - Use docker compose -f docker/docker-compose.yml for all commands - Update setup flow: first run generates docker/data/config.json, container exits, user edits config, then restarts - Replace "Rebuild" section with "Update" (docker pull) since the compose file now uses the pre-built sipeed/picoclaw image - Apply same changes to README.zh.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(docker): use restart: on-failure to prevent restart after first-run setup unless-stopped restarts the container regardless of exit code, causing an infinite loop when entrypoint exits 0 after the initial onboard. on-failure only restarts on non-zero exit (i.e. crashes), so the container stays stopped after setup until the user restarts it manually. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: sync Docker Compose section across all language READMEs Apply the same updates as the English/Chinese READMEs: - Use docker compose -f docker/docker-compose.yml for all commands - Update setup flow to first-run auto-config pattern - Replace build/rebuild section with update via docker pull - Affected: README.fr.md, README.ja.md, README.pt-br.md, README.vi.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 02:10:17 +00:00
dockerfile: docker/Dockerfile.goreleaser
extra_files:
- docker/entrypoint.sh
ids:
- picoclaw
images:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/picoclaw"
- "docker.io/{{ .Env.DOCKERHUB_IMAGE_NAME }}"
tags:
- "{{ .Tag }}"
- "latest"
platforms:
- linux/amd64
- linux/arm64
- linux/riscv64
2026-02-15 01:50:01 +00:00
archives:
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
nfpms:
- id: picoclaw
builds:
- picoclaw
- picoclaw-launcher
- picoclaw-launcher-tui
package_name: picoclaw
file_name_template: >-
{{ .PackageName }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}aarch64
{{- else if eq .Arch "arm" }}armv{{ .Arm }}
{{- else }}{{ .Arch }}{{ end }}
vendor: picoclaw
homepage: https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/picoclaw
maintainer: picoclaw contributors
description: picoclaw - a tool for managing and running tasks
license: MIT
formats:
- rpm
- deb
bindir: /usr/bin
2026-02-15 01:50:01 +00:00
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# upx:
# - enabled: true
# compress: best
# lzma: true
2026-02-15 01:50:01 +00:00
release:
footer: >-
---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).