-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (54 loc) · 1.6 KB
/
Makefile
File metadata and controls
63 lines (54 loc) · 1.6 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
# Configuration
BINARY_NAME := ubuntu_resource_api
.PHONY: help install uninstall build run clean release test
# Default target
help:
@echo "Ubuntu Resource Monitor - Available Commands:"
@echo ""
@echo "Installation:"
@echo " make install - Install as systemd service (requires sudo)"
@echo " make uninstall - Remove systemd service (requires sudo)"
@echo ""
@echo "Development:"
@echo " make build - Build release binary"
@echo " make run - Run the application"
@echo " make test - Run tests"
@echo " make clean - Clean build artifacts"
@echo ""
@echo "Release:"
@echo " make release - Create GitHub release with binaries"
@echo ""
# Install as systemd service
install:
@echo "🚀 Installing Ubuntu Resource Monitor..."
@chmod +x install.sh
@sudo ./install.sh
# Uninstall systemd service
uninstall:
@echo "🗑️ Uninstalling Ubuntu Resource Monitor..."
@chmod +x uninstall.sh
@sudo ./uninstall.sh
# Build release binary
build:
@echo "🔨 Building release binary..."
cargo build --release
# Run the application
run: build
@echo "🚀 Starting Ubuntu Resource Monitor..."
./target/release/$(BINARY_NAME)
# Run tests
test:
@echo "🧪 Running tests..."
cargo test
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
cargo clean
# Create GitHub release
release:
@echo "🏷️ Creating GitHub release..."
@echo "Make sure you have created a tag first:"
@echo " git tag v1.0.0"
@echo " git push origin v1.0.0"
@echo ""
@echo "Then GitHub Actions will automatically build and release binaries."