-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 940 Bytes
/
Makefile
File metadata and controls
51 lines (41 loc) · 940 Bytes
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
41
42
43
44
45
46
47
48
49
50
51
upd:
@echo "Initializing database..."
@docker-compose up -d
downd:
@echo "Stopping database..."
@docker-compose down -v
migrateup:
@echo "Running migration schema"
@migrate
migratedown:
@echo "Running migration schema"
@migrate
build:
@go build -o bin/main.exe
swg:
@swag init
run: swg build
@clear
@echo "Starting server..."
@bin/main.exe
test:
@echo "Testing..."
@go test -v ./...
tidy:
@echo "Tidying..."
@go mod tidy
setup:
@echo "Setting up server...\n"
@echo "Copying .env.example to .env.local...\n"
@cp -pf .env.example .env.local
@echo "Installing dependencies...\n"
@go mod download
@echo "tidying...\n"
@go mod tidy
@echo "create database...\n"
@docker-compose up -d
@echo " ===== build main... ====="
@go build -o bin/main.exe
@echo " ===== Setting up is done ===== "
@echo " ===== Run 'make run' to start server ===== "
.PHONY: upd downd run tidy migrateup migratedown test setup build