From 8739172e48256515edf31bab9db454b9d43ab9ac Mon Sep 17 00:00:00 2001 From: David Dymko Date: Sun, 4 Jan 2026 16:51:09 -0500 Subject: [PATCH 1/4] ci: add goreleaser --- .goreleaser.yaml | 74 +++++++++++++++++++++++++++++++++++++++++ Makefile | 6 ++-- assets/.goreleaser.yaml | 3 ++ 3 files changed, 80 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0c4360e..10f7797 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -11,3 +11,77 @@ version: 2 before: hooks: - make conductor-build-binaries + +builds: + - id: "freight" + main: "./cmd/freight" + binary: "freight" + + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + - arm + flags: + - -trimpath + ignore: + - goos: windows + goarch: arm +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'] + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + +release: + github: + owner: devbytes-cloud + name: freight + +homebrew_casks: + - name: freight + + commit_author: + name: devbytes-bot + email: admin@devbytes.cloud + + homepage: "https://github.com/devbytes-cloud/freight" + description: "Freight is a zero-dependency Git hook orchestrator that replaces fragile scripts with a high-performance Go binary and a single, declarative JSON manifest." + license: "MIT" + url: + verified: github.com/devbytes-cloud/freight + + hooks: + post: + install: | + if OS.mac? + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/freight"] + end + + repository: + owner: devbytes-cloud + name: homebrew-tap + branch: main + token: "{{ .Env.GORELEASER_AUTH_TOKEN }}" + diff --git a/Makefile b/Makefile index ccc8176..a7d541e 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ build-freight: @go build -o freight cmd/freight/main.go .Phony: build-all -build-all: railcar-build-binaries build-freight +build-all: conductor-build-binaries build-freight -.Phony: railcar-build-binaries -railcar-build-binaries: +.Phony: conductor-build-binaries +conductor-build-binaries: goreleaser release --snapshot --clean --config=./assets/.goreleaser.yaml .Phony: test-go diff --git a/assets/.goreleaser.yaml b/assets/.goreleaser.yaml index f939cf1..64e5bc9 100644 --- a/assets/.goreleaser.yaml +++ b/assets/.goreleaser.yaml @@ -20,3 +20,6 @@ builds: - amd64 - arm - arm64 + ignore: + - goos: windows + goarch: arm From a491f2aebe6aa89cc466e2285e35d736fc5a04f3 Mon Sep 17 00:00:00 2001 From: David Dymko Date: Sun, 4 Jan 2026 16:53:07 -0500 Subject: [PATCH 2/4] chore: remove windows arm --- assets/embed.go | 3 --- internal/embed/embeder.go | 2 -- 2 files changed, 5 deletions(-) diff --git a/assets/embed.go b/assets/embed.go index 5f1efa9..5f382f6 100644 --- a/assets/embed.go +++ b/assets/embed.go @@ -24,6 +24,3 @@ var WindowsAMD64 []byte //go:embed dist/conductor_windows_arm64_v8.0/conductor.exe var WindowsARM64 []byte - -//go:embed dist/conductor_windows_arm_6/conductor.exe -var WindowsARM32 []byte diff --git a/internal/embed/embeder.go b/internal/embed/embeder.go index a7e571c..2d1b08e 100644 --- a/internal/embed/embeder.go +++ b/internal/embed/embeder.go @@ -63,8 +63,6 @@ func fetchBinary(systemInfo string) []byte { return assets.WindowsAMD64 case windowsARM64: return assets.WindowsARM64 - case windowsARM32: - return assets.WindowsARM32 default: return nil } From 7302018054f4d889d20038b8b11c3da35ba477d0 Mon Sep 17 00:00:00 2001 From: David Dymko Date: Sun, 4 Jan 2026 17:01:51 -0500 Subject: [PATCH 3/4] fix: adjust make commands for builds --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index a7d541e..70fa915 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,10 @@ build-all: conductor-build-binaries build-freight .Phony: conductor-build-binaries conductor-build-binaries: + goreleaser release --config=./assets/.goreleaser.yaml + +.Phony: conductor-dev-build-binaries +conductor-dev-build-binaries: goreleaser release --snapshot --clean --config=./assets/.goreleaser.yaml .Phony: test-go From 5c4f067bdf967635f7017ab985ebbe437b864164 Mon Sep 17 00:00:00 2001 From: David Dymko Date: Sun, 4 Jan 2026 17:07:18 -0500 Subject: [PATCH 4/4] fix: linting --- internal/embed/embeder.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/embed/embeder.go b/internal/embed/embeder.go index 2d1b08e..09015b2 100644 --- a/internal/embed/embeder.go +++ b/internal/embed/embeder.go @@ -25,8 +25,6 @@ const ( windowsAMD64 string = "windows-amd64" // windowsARM64 represents the Windows ARM64 architecture (windows-arm64). windowsARM64 string = "windows-arm64" - // windowsARM32 represents the Windows ARM32 architecture (windows-arm). - windowsARM32 string = "windows-arm" ) // WriteBinary will install conductor into your working directory