Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ 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 --config=./assets/.goreleaser.yaml

.Phony: conductor-dev-build-binaries
conductor-dev-build-binaries:
goreleaser release --snapshot --clean --config=./assets/.goreleaser.yaml

.Phony: test-go
Expand Down
3 changes: 3 additions & 0 deletions assets/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ builds:
- amd64
- arm
- arm64
ignore:
- goos: windows
goarch: arm
3 changes: 0 additions & 3 deletions assets/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions internal/embed/embeder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -63,8 +61,6 @@ func fetchBinary(systemInfo string) []byte {
return assets.WindowsAMD64
case windowsARM64:
return assets.WindowsARM64
case windowsARM32:
return assets.WindowsARM32
default:
return nil
}
Expand Down