Skip to content

Commit

Permalink
GoReleaser now creates universal_binaries for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
thibauult committed Oct 25, 2023
1 parent 38c9433 commit 8d5068e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ before:
hooks:
- go mod tidy

universal_binaries:
- replace: true

builds:
- env:
- CGO_ENABLED=0
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Go Command Path
GO ?= `which go`

# GoRelease Command Path
GORELEASER ?= `which goreleaser`

GREEN = "\\033[0\;32m"
BOLD = "\\033[1m"
RESET = "\\033[0m"
Expand All @@ -15,11 +18,10 @@ generate: ## Generates the openhue.gen.go client from the latest https://github.
@echo "${GREEN}${BOLD}./openhue/openhue.gen.go successfully generated 🚀${RESET}"

.PHONY: build
build: ## Generates the openhue-cli executable, and output it in the ./bin folder
@$(GO) build -o bin/openhue
@echo "${GREEN}${BOLD}openhue binary successfully generated in ./bin folder 📦${RESET}"
@echo "Checking if the binary file is valid...\n"
./bin/openhue -h
build: ## Generates the openhue-cli executables in the ./dist folder
@$(GORELEASER) check
@$(GORELEASER) build --clean --snapshot
@echo "\n${GREEN}${BOLD}openhue binaries successfully generated in the ./dist folder 📦${RESET}"

.PHONY: tidy
tidy: ## Tidy makes sure go.mod matches the source code in the module
Expand Down

0 comments on commit 8d5068e

Please sign in to comment.