-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (29 loc) · 866 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
BINARY_NAME=trust-wallet-gateway
BUILD_DIR=./build/bin
IMAGE=haroldsphinx/trust-wallet-gateway
TF_DIR=./terraform
all: build-app docker-build
install-dependencies:
@echo " > Installing dependencies"
# Install golangci-lint
brew install golangci/tap/golangci-lint
lint:
@echo " > Running Lint"
@golangci-lint run ./...
test:
@echo " > Running tests"
@go test tests/test.go
build-app:
go build -o $(BINARY_NAME) main.go
mkdir -p $(BUILD_DIR)
mv $(BINARY_NAME) $(BUILD_DIR)
docker-build:
@echo " > Building docker image"
@docker buildx build --platform linux/amd64 -t $(IMAGE) .
terraform-init:
cd $(TF_DIR) && terraform init
terraform-plan:
cd $(TF_DIR) && terraform plan
terraform-apply:
cd $(TF_DIR) && terraform apply
.PHONY: all install-dependencies lint test build-app docker-build terraform-init terraform-plan terraform-apply