-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
52 lines (41 loc) · 956 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
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile for Helm-tui
# Go build settings
BINARY_NAME = helm-tui
SOURCE_DIR = .
BUILD_DIR = ./bin
# Go commands
GO = go
GOFMT = gofmt
GOTEST = go test
GOBUILD = go build
# Default target
all: build
# Clean build directory
clean:
rm -rf $(BUILD_DIR)
# Format Go source files
fmt:
$(GOFMT) -w $(SOURCE_DIR)
# Build the project
build: clean fmt
$(GOBUILD) -o $(BUILD_DIR)/$(BINARY_NAME) $(SOURCE_DIR)
# Run the project
run: build
$(BUILD_DIR)/$(BINARY_NAME)
# Run tests
test:
$(GOTEST) ./...
# Install dependencies
deps:
$(GO) mod tidy
# Help message
help:
@echo "Available targets:"
@echo " clean - Clean the build directory"
@echo " fmt - Format the Go source code"
@echo " build - Build the project"
@echo " run - Run the built binary"
@echo " test - Run tests"
@echo " deps - Install and tidy dependencies"
@echo " help - Show this help message"
.PHONY: all clean fmt build run test deps help