Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
98 lines (72 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
98 lines (72 loc) · 1.62 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.PHONY: build install clean run test
# Build the binary
build:
go build -o bubblefetch ./cmd/bubblefetch
# Build with optimizations
build-release:
go build -ldflags="-s -w" -o bubblefetch ./cmd/bubblefetch
# Install to system
install: build-release
sudo mv bubblefetch /usr/local/bin/
# Clean build artifacts
clean:
rm -f bubblefetch
# Run the program
run: build
./bubblefetch
# Run with a specific theme
run-dracula: build
./bubblefetch --theme dracula
run-minimal: build
./bubblefetch --theme minimal
run-nord: build
./bubblefetch --theme nord
run-gruvbox: build
./bubblefetch --theme gruvbox
run-tokyo: build
./bubblefetch --theme tokyo-night
run-monokai: build
./bubblefetch --theme monokai
run-solarized: build
./bubblefetch --theme solarized-dark
# Run tests
test:
go test -v ./...
# Format code
fmt:
go fmt ./...
# Run linter
lint:
golangci-lint run
# Download dependencies
deps:
go mod download
go mod tidy
# Install system-wide
install: build-release
./install.sh
# Uninstall
uninstall:
./uninstall.sh
# Run benchmark
bench: build
./bubblefetch --benchmark
# Export examples
export-json: build
./bubblefetch --export json --pretty=true
export-yaml: build
./bubblefetch --export yaml
export-text: build
./bubblefetch --export text
# Build example plugin
plugin-hello:
go build -buildmode=plugin -o plugins/hello.so plugins/examples/hello.go
# Build all example plugins
plugins: plugin-hello
# Install plugins to user directory
install-plugins: plugins
mkdir -p ~/.config/bubblefetch/plugins
cp plugins/*.so ~/.config/bubblefetch/plugins/
# Clean plugin artifacts
clean-plugins:
rm -f plugins/*.so