-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path.ahoy.yml
More file actions
114 lines (101 loc) · 3.71 KB
/
Copy path.ahoy.yml
File metadata and controls
114 lines (101 loc) · 3.71 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
ahoyapi: v2
commands:
build:
usage: Build ahoy with version information using Goreleaser.
description: |
Compiles the ahoy binary using Goreleaser with version
information automatically embedded.
This creates a snapshot build with proper version flags and
optimisation.
The binary will be created in the dist directory.
cmd: goreleaser build --config ../.goreleaser.yml --snapshot --clean --single-target
build-all:
usage: Build all supported architectures and OSes using Goreleaser.
description: |
Builds ahoy for all supported platforms (linux, darwin, windows) and
architectures (amd64, arm64, arm) using Goreleaser configuration.
Creates optimised binaries for distribution with proper naming and
packaging.
cmd: goreleaser build --config ../.goreleaser.yml --snapshot --clean
install:
usage: Install ahoy locally using go install.
description: |
Installs ahoy directly to your GOPATH/bin using go install.
This is useful for development but doesn't include version information
that Goreleaser builds provide.
cmd: "go install"
bats:
usage: "Run the BATS bash testing command."
description: |
Executes the BATS (Bash Automated Testing System) test suite.
This runs integration tests that verify ahoy's command-line behavior
and functionality across different scenarios.
cmd: |
bats tests
test:
usage: Run automated tests.
description: |
Executes the complete test suite for ahoy including:
- Go vet for code quality checks
- Go unit tests with race detection
- BATS integration tests for command-line behavior
Stops on first failure and reports overall results.
cmd: |
set -euo pipefail
TESTS=(
'go vet'
'go test -v -race'
'bats tests'
)
for cmd in "${TESTS[@]}"; do
printf "\n=== TEST: %s ===\n\n" "$cmd"
eval "$cmd"
done
echo "All tests passed."
gomod:
usage: Manage Go module dependencies.
description: |
Performs complete Go module maintenance:
- Tidies the go.mod file by removing unused dependencies
- Downloads and vendors all dependencies
- Verifies downloaded modules against checksums
cmd: |
go mod tidy
go mod vendor
go mod verify
gofmt:
usage: Format Go code according to standards.
description: |
Automatically formats all Go source files in the current directory
according to Go's standard formatting rules.
This ensures consistent code style across the project.
cmd: gofmt -w .
release:
usage: Create a release using Goreleaser.
description: |
Creates a full release using Goreleaser including:
- Building for all platforms and architectures
- Generating checksums and SBOMs
- Creating archives and signing artifacts
Requires proper git tags and GPG setup for signing.
cmd: goreleaser release --config ../.goreleaser.yml --clean
echo:
usage: Display a message
description: |
This is a simple command that echoes any arguments passed to it.
Useful for testing and basic output.
cmd: echo "$@"
list:
usage: List directory contents
description: |
Lists all files and directories in the specified location.
Shows hidden files (starting with .) and supports all standard
ls options.
If no directory is specified, lists the current directory.
cmd: ls -a "$@"
whalesay:
usage: Make a whale say something
description: |
Uses Docker to run the whalesay container with a dragon figure to
display your message in ASCII art.
cmd: docker run --rm docker/whalesay cowsay -f dragon "$@"