This repository was archived by the owner on Jan 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
155 lines (120 loc) · 3.2 KB
/
Copy pathjustfile
File metadata and controls
155 lines (120 loc) · 3.2 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Blobber development commands
set shell := ["bash", "-euo", "pipefail", "-c"]
set dotenv-load
# Default recipe - show available commands
default:
@just --list
# ---------- Build ----------
# Build all packages
[group('build')]
build:
go build ./...
# Build the CLI binary
[group('build')]
build-cli:
go build -o bin/blobber ./cmd/blobber
# ---------- Test ----------
# Run all tests
[group('test')]
test:
go test ./...
# Run tests with verbose output
[group('test')]
test-v:
go test -v ./...
# Run tests with coverage
[group('test')]
test-cover:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
# Run integration tests (requires Docker)
[group('test')]
test-integration:
go test -tags=integration -v -timeout=10m ./...
# Run integration tests with verbose container logs
[group('test')]
test-integration-debug:
TESTCONTAINERS_DEBUG=true go test -tags=integration -v -timeout=10m ./...
# ---------- Lint & Format ----------
# Run golangci-lint
[group('lint')]
lint:
golangci-lint run
# Run golangci-lint with auto-fix
[group('lint')]
lint-fix:
golangci-lint run --fix
# Format code with gofmt and goimports
[group('lint')]
fmt:
gofmt -w .
goimports -w -local github.com/meigma/blobber .
# Check formatting without making changes
[group('lint')]
fmt-check:
@test -z "$(gofmt -l .)" || (echo "Files need formatting:" && gofmt -l . && exit 1)
# ---------- Development ----------
# Run go mod tidy
tidy:
go mod tidy
# Clean build artifacts
clean:
rm -rf bin/ coverage.out coverage.html
# ---------- Registry ----------
# Start local test registry
[group('registry')]
registry-start:
@docker start blobber-registry 2>/dev/null || \
docker run -d -p 5050:5000 --name blobber-registry registry:2
@echo "Registry running at localhost:5050"
# Stop local test registry
[group('registry')]
registry-stop:
@docker stop blobber-registry 2>/dev/null || true
@echo "Registry stopped"
# Remove local test registry
[group('registry')]
registry-rm: registry-stop
@docker rm blobber-registry 2>/dev/null || true
@echo "Registry removed"
# Show registry logs
[group('registry')]
registry-logs:
docker logs -f blobber-registry
# ---------- CI ----------
# Run all CI checks (lint, test, build)
[group('ci')]
ci: lint test build
@echo "All CI checks passed"
# ---------- Docs ----------
# Install docs dependencies
[group('docs')]
docs-install:
cd docs && npm install
# Start docs development server
[group('docs')]
docs-dev:
cd docs && npm start
# Build docs for production
[group('docs')]
docs-build:
cd docs && npm run build
# Serve production docs build locally
[group('docs')]
docs-serve:
cd docs && npm run serve
# ---------- Release ----------
# Check goreleaser configuration
[group('release')]
release-check:
goreleaser check
# Build a snapshot release locally (no publish)
[group('release')]
release-snapshot:
goreleaser release --snapshot --clean
# ---------- Private Helpers ----------
[private]
_ensure-registry:
@docker start blobber-registry 2>/dev/null || \
docker run -d -p 5050:5000 --name blobber-registry registry:2