Skip to content

Commit a18b9b3

Browse files
blink-so[bot]f0ssel
andcommitted
simplify Makefile by removing install, uninstall, tidy, dev-setup, help targets
Removed targets that are not core to build/test workflow: - install/uninstall: System installation should be manual - tidy: Direct go mod commands are clearer in workflows - dev-setup: Too opinionated for a build tool - help: Makefile is simple enough without help Remaining focused targets: - build: Build for current platform - build-all: Cross-platform builds - test: Run tests with race detection - test-coverage: Generate coverage reports - clean: Clean build artifacts - fmt: Format code - lint: Lint code Updated GitHub Actions workflows to use direct Go commands for dependency management instead of removed make tidy. Updated RELEASES.md to reflect simplified Makefile. Tested: make build && make test && make clean works correctly. Co-authored-by: f0ssel <[email protected]>
1 parent 6a404d0 commit a18b9b3

File tree

6 files changed

+25
-68
lines changed

6 files changed

+25
-68
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
${{ runner.os }}-go-
5050
5151
- name: Download dependencies
52-
run: make tidy
52+
run: go mod download
53+
54+
- name: Verify dependencies
55+
run: go mod verify
5356

5457
- name: Build binary
5558
run: |

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ jobs:
3636
${{ runner.os }}-go-
3737
3838
- name: Download dependencies
39-
run: make tidy
39+
run: go mod download
40+
41+
- name: Verify dependencies
42+
run: go mod verify
4043

4144
- name: Run tests
4245
run: make test

.github/workflows/makefile-build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ jobs:
3030
restore-keys: |
3131
${{ runner.os }}-go-
3232
33-
- name: Set up development environment
34-
run: make dev-setup
33+
- name: Download dependencies
34+
run: go mod download
35+
36+
- name: Verify dependencies
37+
run: go mod verify
3538

3639
- name: Run tests
3740
run: make test

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
${{ runner.os }}-go-
5050
5151
- name: Download dependencies
52-
run: make tidy
52+
run: go mod download
53+
54+
- name: Verify dependencies
55+
run: go mod verify
5356

5457
- name: Build binary
5558
run: |

Makefile

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ clean:
6060
rm -f coverage.out coverage.html
6161
@echo "✓ Clean complete!"
6262

63-
# Install binary to system PATH
64-
.PHONY: install
65-
install: build
66-
@echo "Installing $(BINARY_NAME) to /usr/local/bin..."
67-
sudo cp $(BINARY_NAME) /usr/local/bin/
68-
@echo "$(BINARY_NAME) installed successfully!"
69-
70-
# Uninstall binary from system PATH
71-
.PHONY: uninstall
72-
uninstall:
73-
@echo "Uninstalling $(BINARY_NAME) from /usr/local/bin..."
74-
sudo rm -f /usr/local/bin/$(BINARY_NAME)
75-
@echo "$(BINARY_NAME) uninstalled successfully!"
76-
7763
# Format code
7864
.PHONY: fmt
7965
fmt:
@@ -91,48 +77,4 @@ lint:
9177
echo "golangci-lint not found, running go vet instead..."; \
9278
go vet ./...; \
9379
fi
94-
@echo "✓ Linting complete!"
95-
96-
# Tidy dependencies
97-
.PHONY: tidy
98-
tidy:
99-
@echo "Tidying dependencies..."
100-
go mod tidy
101-
go mod verify
102-
@echo "✓ Dependencies tidied!"
103-
104-
# Development setup
105-
.PHONY: dev-setup
106-
dev-setup:
107-
@echo "Setting up development environment..."
108-
go mod download
109-
go mod verify
110-
@if ! command -v golangci-lint >/dev/null 2>&1; then \
111-
echo "Installing golangci-lint..."; \
112-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; \
113-
fi
114-
@echo "✓ Development environment ready!"
115-
116-
# Show help
117-
.PHONY: help
118-
help:
119-
@echo "Available targets:"
120-
@echo " build - Build binary for current platform"
121-
@echo " build-all - Build binaries for all supported platforms"
122-
@echo " test - Run tests"
123-
@echo " test-coverage- Run tests with coverage report"
124-
@echo " clean - Clean build artifacts"
125-
@echo " install - Install binary to /usr/local/bin"
126-
@echo " uninstall - Remove binary from /usr/local/bin"
127-
@echo " fmt - Format code"
128-
@echo " lint - Lint code (requires golangci-lint)"
129-
@echo " tidy - Tidy and verify dependencies"
130-
@echo " dev-setup - Set up development environment"
131-
@echo " help - Show this help message"
132-
@echo ""
133-
@echo "Examples:"
134-
@echo " make build # Build for current platform"
135-
@echo " make build-all # Build for all platforms"
136-
@echo " make test # Run tests"
137-
@echo " make clean # Clean build artifacts"
138-
@echo " make install # Install to system PATH"
80+
@echo "✓ Linting complete!"

RELEASES.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@ make build-all
5656
# Run tests
5757
make test
5858

59+
# Run tests with coverage
60+
make test-coverage
61+
5962
# Clean build artifacts
6063
make clean
6164

62-
# Install to system PATH
63-
make install
65+
# Format code
66+
make fmt
6467

65-
# Show all available targets
66-
make help
68+
# Lint code
69+
make lint
6770
```
6871

6972
### Quick Build

0 commit comments

Comments
 (0)