Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(ci): release artifacts for freebsd #1192

Merged
merged 5 commits into from
Jan 25, 2024
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
11 changes: 11 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ builds:
goos:
- darwin
- linux
- freebsd
- windows
goarch:
- amd64
Expand All @@ -35,6 +36,16 @@ builds:
goarm:
- '7'
ignore:
- goos: freebsd
goarch: arm64
- goos: freebsd
goarch: arm
- goos: freebsd
goarch: ppc64le
- goos: freebsd
goarch: riscv64
- goos: freebsd
goarch: s390x
- goos: windows
goarch: arm64
- goos: windows
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
GO_EXE = go

TARGET_OBJS ?= checksums.txt darwin_amd64.tar.gz darwin_arm64.tar.gz linux_amd64.tar.gz linux_arm64.tar.gz linux_armv7.tar.gz linux_s390x.tar.gz linux_ppc64le.tar.gz linux_riscv64.tar.gz windows_amd64.zip
TARGET_OBJS ?= checksums.txt darwin_amd64.tar.gz darwin_arm64.tar.gz linux_amd64.tar.gz linux_arm64.tar.gz linux_armv7.tar.gz linux_s390x.tar.gz linux_ppc64le.tar.gz linux_riscv64.tar.gz windows_amd64.zip freebsd_amd64.tar.gz

LDFLAGS = -w
ifdef VERSION
Expand Down Expand Up @@ -112,6 +112,14 @@ build-windows-arm64: ## build for windows arm64
GOARCH=arm64 CGO_ENABLED=0 GOOS=windows $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/windows/arm64/$(CLI_EXE).exe $(CLI_PKG)

.PHONY: build-freebsd
build-freebsd: build-freebsd-amd64 ## build all freebsd architectures

.PHONY: build-freebsd-amd64
build-freebsd-amd64: ## build for freebsd amd64
GOARCH=amd64 CGO_ENABLED=0 GOOS=freebsd $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/freebsd/amd64/$(CLI_EXE) $(CLI_PKG)

.PHONY: check-encoding
check-encoding: ## check file CR/LF encoding
! find cmd internal -name "*.go" -type f -exec file "{}" ";" | grep CRLF
Expand Down