-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
75 lines (60 loc) 路 2.24 KB
/
Copy pathjustfile
File metadata and controls
75 lines (60 loc) 路 2.24 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
# Set default environment variables
export ENV := env_var_or_default("ENV", "dev")
# Load environment files
set dotenv-load
# 馃搵 Default recipe (list available recipes)
default:
@echo "馃搵 Listing all available recipes in the justfile..."
@just --list
# 馃帲 Initialize and install required hooks
init-hooks:
@echo "馃帲 Initializing and installing required pre-commit hooks..."
@echo "馃摝 Installing pre-commit package using pip..."
pip install pre-commit
@echo "馃敡 Setting up pre-commit hooks in the local repository..."
pre-commit install --install-hooks
# 馃弮 Run all the hooks described in the .pre-commit-config.yaml file
run-hooks:
@echo "馃弮 Running all pre-commit hooks defined in .pre-commit-config.yaml..."
pre-commit run --all-files
# 馃殌 Execute all the Go CI tasks in the pkg/root module
go-ci: go-tidy go-fmt go-vet go-lint go-test
@echo "馃殌 Executing all Go CI tasks for the pkg/root module..."
# 馃摝 Publish the Go module to the registry
go-publish:
@echo "馃摝 Publishing Go module to the registry..."
@echo "馃弮 Running publish-go-module.sh script..."
@./scripts/publish-go-module.sh
# Go tasks (imported from taskfiles/Taskfile.go.yml)
# 馃Ч Tidy Go module dependencies
go-tidy:
@echo "馃Ч Tidying Go module dependencies in the current directory..."
go mod tidy
# 馃拝 Format Go code
go-fmt:
@echo "馃拝 Formatting all Go code in the current directory and subdirectories..."
go fmt ./...
# 馃攳 Vet Go code
go-vet:
@echo "馃攳 Vetting all Go code in the current directory and subdirectories..."
go vet ./...
# 馃毃 Lint Go code
go-lint *ARGS:
@echo "馃毃 Linting Go code using golangci-lint..."
golangci-lint run {{ARGS}}
# 馃И Run Go tests
go-test:
@echo "馃И Running all Go tests in verbose mode..."
go test -v ./...
# 馃幁 Run pre-commit hooks on staged files
pc-staged:
@echo "馃幁 Running pre-commit hooks on staged files in the current repository..."
pre-commit run
# 馃攧 Update pre-commit hooks
pc-update:
@echo "馃攧 Updating all pre-commit hooks to their latest versions..."
pre-commit autoupdate
# 馃Ъ Clean pre-commit cache
pc-clean:
@echo "馃Ъ Cleaning pre-commit cache to ensure a fresh state..."
pre-commit clean