From 4d4aa2df8c51ba920d20a79aa7183ea4a7ed8165 Mon Sep 17 00:00:00 2001 From: pieceowater Date: Mon, 6 Jan 2025 22:27:04 +0500 Subject: [PATCH] cleanup --- Makefile | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 7701aab..6666584 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +# Project configuration APP_NAME = lotof.atrace.msvc.tracker BUILD_DIR = bin MAIN_FILE = cmd/server/main.go @@ -8,21 +9,19 @@ PROTOC_PKG = github.com/pieceowater-dev/lotof.atrace.proto PROTOC_PKG_PATH = $(shell go list -m -f '{{.Dir}}' $(PROTOC_PKG)) PROTOC_DIR = protos PROTOC_OUT_DIR = ./internal/core/grpc/generated -DOCKER_COMPOSE = docker-compose export PATH := /usr/local/bin:$(PATH) -.PHONY: all clean build run update migration migrate db-sync setup install-flyway install-atlas install-postgres install-atlas-cli \ - grpc-gen grpc-clean grpc-update compose-up compose-down gql-gen gql-clean - -# Setup the environment -setup: install-atlas-cli grpc-update - @echo "Setup completed!"; \ - go mod tidy +.PHONY: all clean build run update setup grpc-gen grpc-clean grpc-update # Default build target all: build +# Setup the environment +setup: grpc-update + @echo "Setup completed!" + go mod tidy + # Update dependencies update: go mod tidy @@ -57,25 +56,3 @@ grpc-clean: # Update gRPC dependencies grpc-update: go get -u $(PROTOC_PKG)@latest - -# Docker build target -build-docker: - docker build -t $(APP_NAME) . - -# Build Docker image and run the container -build-and-run-docker: build-docker - docker stop $(APP_NAME) - docker rm $(APP_NAME) - docker run -d -p 50051:50051 \ - -e POSTGRES_DB_DSN="$(PG_DB_DSN)" \ - --network lotofsamplesvc_pieceonetwork \ - --name $(APP_NAME) \ - $(APP_NAME) - -# Start Docker Compose services -compose-up: - $(DOCKER_COMPOSE) up -d - -# Stop Docker Compose services -compose-down: - $(DOCKER_COMPOSE) down \ No newline at end of file