From 2a807b38fc3758745b2b87d8dc71e4a40f46c96e Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 15 Aug 2026 13:36:19 +0530 Subject: [PATCH] fix(release): stage the sidecar jar at the renamed embed path --- .goreleaser.yaml | 8 ++++---- Makefile | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1647206..e83ff41 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -5,10 +5,10 @@ project_name: sanderling before: hooks: # The Go binary embeds the sidecar fat JAR via //go:embed gated by the - # `withsidecar` build tag. Rebuild the JAR and stage it at the embed - # path so the `go build` below picks up fresh bytes. - - make sidecar - - sh -c 'mkdir -p internal/sidecar/assets && cp sidecar/build/libs/sidecar-all.jar internal/sidecar/assets/sidecar-all.jar' + # `withsidecar` build tag. The Makefile target rebuilds the JAR and stages + # it at the embed path, so the `go build` below picks up fresh bytes and + # that path stays spelled out in exactly one place. + - make sidecar-embed builds: - id: sanderling diff --git a/Makefile b/Makefile index fb40b4e..632f8b0 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ WEB_DIST := replay-ui/dist GOLINES := $(shell $(GO) env GOPATH)/bin/golines -.PHONY: bootstrap proto sidecar sanderling sanderling-web sanderling-android sanderling-ios install test test-go test-browser test-companion test-kotlin test-spec-api spec-typecheck web-test web-typecheck web-build web-dev replay-dev docs clean release-cli release-npm-dry fmt fmt-go fmt-kotlin fmt-ts fmt-swift +.PHONY: bootstrap proto sidecar sidecar-embed sanderling sanderling-web sanderling-android sanderling-ios install test test-go test-browser test-companion test-kotlin test-spec-api spec-typecheck web-test web-typecheck web-build web-dev replay-dev docs clean release-cli release-npm-dry fmt fmt-go fmt-kotlin fmt-ts fmt-swift bootstrap: $(GO) mod download @@ -42,6 +42,10 @@ proto: sidecar: $(SIDECAR_JAR) +# Stages the JAR where //go:embed expects it. Release tooling calls this rather +# than copying the JAR itself, so the embed path is spelled out in one place. +sidecar-embed: $(SIDECAR_EMBED) + sanderling: $(SANDERLING_BIN) $(SANDERLING_BIN): $(SIDECAR_EMBED) $(COMPANION_EMBED) $(RUNNER_EMBED) web-build