-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 778 Bytes
/
Makefile
File metadata and controls
33 lines (27 loc) · 778 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
.PHONY: build install clean
# Build the binary
build:
go build -o gencommit main.go
# Install to /usr/local/bin (requires sudo)
install: build
sudo cp gencommit /usr/local/bin/
sudo chmod +x /usr/local/bin/gencommit
@echo "gencommit installed successfully to /usr/local/bin"
@echo "You can now use 'gencommit' command from anywhere"
# Install to user's local bin directory (no sudo required)
install-local: build
mkdir -p ~/.local/bin
cp gencommit ~/.local/bin/
chmod +x ~/.local/bin/gencommit
@echo "gencommit installed successfully to ~/.local/bin"
@echo "Make sure ~/.local/bin is in your PATH"
# Clean build artifacts
clean:
rm -f gencommit
# Run the tool locally (for testing)
run: build
./gencommit
# Get dependencies
deps:
go mod tidy
go mod download