Skip to content

feat: add linux/s390x build target to release distribution#930

Merged
dangrondahl merged 1 commit into
mainfrom
929-cli-add-linuxs390x-build-target-to-release-distribution
Jun 3, 2026
Merged

feat: add linux/s390x build target to release distribution#930
dangrondahl merged 1 commit into
mainfrom
929-cli-add-linuxs390x-build-target-to-release-distribution

Conversation

@dangrondahl

Copy link
Copy Markdown
Contributor

Summary

  • Add linux/s390x to the GoReleaser build matrix so IBM Z users can install the CLI natively
  • Ignore s390x for darwin and windows (not supported / not needed)
  • Skip the npm post-hook for s390x since we don't publish an npm package for that arch

Closes #929

Test plan

  • GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build produces a 64-bit s390x ELF binary
  • Binary runs under qemu in s390x/alpine Docker container; kosli --version succeeds
  • Next release publishes linux/s390x archive + .deb / .rpm artifacts

Adds linux/s390x to the GoReleaser build matrix so the CLI can be
installed natively on IBM Z hosts. Skips s390x for darwin/windows and
for the npm post-hook (no npm package for s390x).

Closes #929
@dangrondahl dangrondahl linked an issue Jun 3, 2026 that may be closed by this pull request
@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @dangrondahl's task in 4m 10s —— View job


PR Review: Add linux/s390x build target

  • Gather context and read changed files
  • Run static analysis (go build, go vet, go mod tidy)
  • Review .goreleaser.yml changes
  • Post review findings

Static Analysis

All checks pass:

  • go build ./... — compiles cleanly
  • go vet ./... — no issues
  • go mod tidy — no drift in go.mod/go.sum
  • GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build ./cmd/kosli/ — cross-compilation succeeds

Review

This PR looks good. The change is minimal and well-scoped — a single config file with clear intent.

What's correct:

  • s390x added to goarch list, properly excluded for darwin and windows via ignore blocks (neither OS supports s390x)
  • The npm post-hook early-exit (if [ "$ARCH" = "s390x" ]; then exit 0; fi) is the right approach — there's no npm/cli-linux-s390x/ package, and the npm-publish.sh script operates on whatever directories exist, so skipping directory creation is sufficient
  • The nfpms contents template (line 102) already handles s390x via the final {{ .Arch }} fallback — no changes needed there
  • The OS="{{ .Os }}" line was moved below the early exit, which is a nice touch — avoids setting a variable that would never be used

One minor observation (non-blocking): The post-hook reorders OS and ARCH variable assignments so the early exit happens before OS is set. This is logically correct but changes the variable ordering for all architectures, not just s390x. It's a trivial change and has no functional impact since both variables are independent, but worth noting for the commit record.

No issues found. Clean, minimal change with appropriate handling of the npm packaging edge case. LGTM.

@dangrondahl dangrondahl enabled auto-merge (squash) June 3, 2026 14:09
@mbevc1

mbevc1 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@dangrondahl bumping to go 1.26.4 should fix Snyk flagged vulnerability

@dangrondahl dangrondahl merged commit 4acd31e into main Jun 3, 2026
34 of 35 checks passed
@dangrondahl dangrondahl deleted the 929-cli-add-linuxs390x-build-target-to-release-distribution branch June 3, 2026 14:15
@claude claude Bot mentioned this pull request Jun 4, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli: add linux/s390x build target to release distribution

2 participants