-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (63 loc) Β· 2.02 KB
/
Makefile
File metadata and controls
73 lines (63 loc) Β· 2.02 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# GoQueue Makefile
# Build and installation automation
.PHONY: build install uninstall clean test help
# Default target
all: build
# Build the binary
build:
@echo "π¨ Building GoQueue..."
@echo "π¦ Resolving dependencies..."
go mod tidy
go build -o goq
@echo "β
Build complete! Binary: ./goq"
# Install to system directory (requires sudo)
install: build
@echo "π¦ Installing GoQueue to /usr/local/bin..."
sudo cp goq /usr/local/bin/goq
@echo "β
GoQueue installed successfully!"
@echo "π You can now use 'goq' from anywhere!"
# Install to user directory (no sudo required)
install-user: build
@echo "π¦ Installing GoQueue to ~/.local/bin..."
mkdir -p ~/.local/bin
cp goq ~/.local/bin/goq
@echo "β
GoQueue installed to user directory!"
@echo "βΉοΈ Make sure ~/.local/bin is in your PATH"
@echo " Add this to your shell profile: export PATH=\"\$$HOME/.local/bin:\$$PATH\""
# Uninstall from system directory
uninstall:
@echo "ποΈ Uninstalling GoQueue..."
sudo rm -f /usr/local/bin/goq
@echo "β
GoQueue uninstalled successfully!"
# Uninstall from user directory
uninstall-user:
@echo "ποΈ Uninstalling GoQueue from user directory..."
rm -f ~/.local/bin/goq
@echo "β
GoQueue uninstalled from user directory!"
# Clean build artifacts
clean:
@echo "π§Ή Cleaning build artifacts..."
rm -f goq
@echo "β
Clean complete!"
# Run tests
test:
@echo "π§ͺ Running tests..."
go test ./...
@echo "β
Tests complete!"
# Display help
help:
@echo "GoQueue Build Commands:"
@echo ""
@echo " build - Build the binary"
@echo " install - Install to /usr/local/bin (requires sudo)"
@echo " install-user - Install to ~/.local/bin (no sudo required)"
@echo " uninstall - Remove from /usr/local/bin"
@echo " uninstall-user - Remove from ~/.local/bin"
@echo " clean - Remove build artifacts"
@echo " test - Run tests"
@echo " help - Show this help message"
@echo ""
@echo "Examples:"
@echo " make build"
@echo " make install-user"
@echo " make uninstall"