From 4ffbe7a2ed549334a904be9ed1be7ece9f1ca94b Mon Sep 17 00:00:00 2001 From: lxowalle Date: Thu, 30 Apr 2026 21:19:14 +0800 Subject: [PATCH] fix(release): drop stale launcher tui goreleaser target --- .goreleaser.yaml | 46 -------------------------- scripts/test-goreleaser-build-mains.sh | 21 ++++++++++++ 2 files changed, 21 insertions(+), 46 deletions(-) create mode 100644 scripts/test-goreleaser-build-mains.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d8c51b069..fe43a0921 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -100,49 +100,6 @@ builds: - goos: netbsd goarch: arm - - id: picoclaw-launcher-tui - binary: picoclaw-launcher-tui - env: - - CGO_ENABLED=0 - tags: - - goolm - - stdjson - ldflags: - - -s -w - - -X github.com/sipeed/picoclaw/pkg/config.Version={{ .Version }} - - -X github.com/sipeed/picoclaw/pkg/config.GitCommit={{ .ShortCommit }} - - -X github.com/sipeed/picoclaw/pkg/config.BuildTime={{ .Date }} - - -X github.com/sipeed/picoclaw/pkg/config.GoVersion={{ with index .Env "GOVERSION" }}{{ . }}{{ else }}unknown{{ end }} - goos: - - linux - - windows - - darwin - - freebsd - - netbsd - goarch: - - amd64 - - arm64 - - riscv64 - - loong64 - - arm - - s390x - - mipsle - goarm: - - "6" - - "7" - gomips: - - softfloat - main: ./cmd/picoclaw-launcher-tui - ignore: - - goos: windows - goarch: arm - - goos: netbsd - goarch: s390x - - goos: netbsd - goarch: mips64 - - goos: netbsd - goarch: arm - dockers_v2: - id: picoclaw dockerfile: docker/Dockerfile.goreleaser @@ -166,7 +123,6 @@ dockers_v2: ids: - picoclaw - picoclaw-launcher - - picoclaw-launcher-tui images: - "ghcr.io/{{ .Env.GITHUB_REPOSITORY_OWNER }}/picoclaw" - 'docker.io/{{ .Env.DOCKERHUB_IMAGE_NAME }}' @@ -184,7 +140,6 @@ notarize: ids: - picoclaw - picoclaw-launcher - - picoclaw-launcher-tui sign: certificate: "{{.Env.MACOS_SIGN_P12}}" password: "{{.Env.MACOS_SIGN_PASSWORD}}" @@ -215,7 +170,6 @@ nfpms: ids: - picoclaw - picoclaw-launcher - - picoclaw-launcher-tui package_name: picoclaw file_name_template: >- {{ .PackageName }}_ diff --git a/scripts/test-goreleaser-build-mains.sh b/scripts/test-goreleaser-build-mains.sh new file mode 100644 index 000000000..6aa96f7ac --- /dev/null +++ b/scripts/test-goreleaser-build-mains.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +CONFIG_FILE="${ROOT_DIR}/.goreleaser.yaml" + +failed=0 +while IFS= read -r main_path; do + main_path="${main_path#./}" + if [ ! -e "${ROOT_DIR}/${main_path}" ]; then + echo "missing goreleaser build main: ${main_path}" >&2 + failed=1 + fi +done < <(sed -n 's/^[[:space:]]*main:[[:space:]]*//p' "${CONFIG_FILE}") + +if [ "${failed}" -ne 0 ]; then + exit 1 +fi + +echo "all goreleaser build mains exist"