Skip to content

Commit

Permalink
feat(Makefile): add build target
Browse files Browse the repository at this point in the history
The build target will build the binary for the Linux platform.
  • Loading branch information
Ajnasz committed May 20, 2024
1 parent 50f1d68 commit 59f71d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ all: clean linux
run:
@cd cmd/sekret.link && POSTGRES_URL="postgres://postgres:password@localhost:5432/sekret_link_test?sslmode=disable" go run . -webExternalURL=/api -base62

.PHONY: build
build: build/${BINARY_NAME}.linux.amd64

build/${BINARY_NAME}.linux.amd64:
cd cmd/sekret.link && GOARCH=amd64 GOOS=linux go build ${BUILD_ARGS} -ldflags "-w -s -X main.version=${VERSION} -X main.build=${BUILD}" -o ../../$@

Expand Down

0 comments on commit 59f71d4

Please sign in to comment.