Skip to content

Commit

Permalink
build(ci): release artifacts for freebsd (#1192)
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag <[email protected]>
  • Loading branch information
kranurag7 authored Jan 25, 2024
1 parent 616c3e1 commit fbd10af
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
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

0 comments on commit fbd10af

Please sign in to comment.