Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): add name to service #20

Merged
merged 2 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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