Skip to content

Commit

Permalink
feat(build): add name to service (#20)
Browse files Browse the repository at this point in the history
* build: add phony

* feat(build): add name to service
  • Loading branch information
alexfalkowski authored Apr 16, 2023
1 parent ce1f800 commit 5315f9f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/make/go.mak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: vendor

download:
go mod download

Expand Down
2 changes: 2 additions & 0 deletions build/make/ruby.mak
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: vendor features

# Setup all needed.
setup: setup-bundler

Expand Down
16 changes: 16 additions & 0 deletions build/make/service.mak
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.PHONY: vendor

NAME=$(shell basename $(CURDIR))

# Setup ruby.
ruby-setup:
make -C test setup
Expand Down Expand Up @@ -122,6 +126,18 @@ go-sec:
# Run security checks.
sec: go-sec

# Build release binary.
build:
go build -race -ldflags="-X 'github.com/alexfalkowski/$(NAME)/cmd.Version=latest'" -mod vendor -o $(NAME) main.go

# Build test binary.
build-test:
go test -race -ldflags="-X 'github.com/alexfalkowski/$(NAME)/cmd.Version=latest'" -mod vendor -c -tags features -covermode=atomic -o $(NAME) -coverpkg=./... github.com/alexfalkowski/$(NAME)

# Release to docker hub.
docker:
bin/build/docker/push $(NAME)

# Start the environment.
start:
bin/build/docker/env start
Expand Down

0 comments on commit 5315f9f

Please sign in to comment.