Skip to content

Commit

Permalink
Merge pull request #153 from killjoy1221/chore/makefile-sources
Browse files Browse the repository at this point in the history
(chore) Update makefile with source files to trigger automatic rebuilds
  • Loading branch information
josegonzalez authored May 19, 2024
2 parents c63b37b + 0790b75 commit 6053c71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ endef

export PACKAGE_DESCRIPTION

SOURCE_FILES = bashenv/* *.go go.mod go.sum

LIST = build release release-packagecloud validate
targets = $(addsuffix -in-docker, $(LIST))

Expand Down Expand Up @@ -61,19 +63,19 @@ $(targets): %-in-docker: .env.docker
--workdir /src/github.com/$(MAINTAINER)/$(REPOSITORY) \
$(IMAGE_NAME):build make -e $(@:-in-docker=)

build/darwin/$(NAME):
build/darwin/$(NAME): $(SOURCE_FILES)
mkdir -p build/darwin
CGO_ENABLED=0 GOOS=darwin go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \
-ldflags "-s -w -X main.Version=$(VERSION)" \
-o build/darwin/$(NAME)

build/linux/$(NAME)-amd64:
build/linux/$(NAME)-amd64: $(SOURCE_FILES)
mkdir -p build/linux
CGO_ENABLED=0 GOOS=linux go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \
-ldflags "-s -w -X main.Version=$(VERSION)" \
-o build/linux/$(NAME)-amd64

build/linux/$(NAME)-arm64:
build/linux/$(NAME)-arm64: $(SOURCE_FILES)
mkdir -p build/linux
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \
-ldflags "-s -w -X main.Version=$(VERSION)" \
Expand Down

0 comments on commit 6053c71

Please sign in to comment.