Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
discrawl/Makefile at main · openclaw/discrawl · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
openclaw
discrawl
Repository navigation
Code
Issues
1
(1)
Pull requests
2
(2)
Actions
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
discrawl
/
Makefile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
101 lines (81 loc) · 4.05 KB
main
Breadcrumbs
discrawl
/
Makefile
Copy path
Top
File metadata and controls
Code
Blame
101 lines (81 loc) · 4.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
BINARY
?= bin/discrawl
VERSION
?= dev
ARTIFACT_DIR
?= dist
.DEFAULT_GOAL
:= help
.PHONY
: help build test test-large test-race test-coverage fmt lint tidy-check smoke check snapshot release verify-release release-artifacts release-snapshot generate-sqlc clean
help
:
@printf
'
%s\n
'
\
'
Available targets:
'
\
'
help Print available targets (default).
'
\
'
build Build the CLI into $(BINARY).
'
\
'
test Run the full Go test suite.
'
\
'
test-large Run the opt-in catalog-integrity calibration fixture.
'
\
'
fmt Check Go formatting.
'
\
'
lint Run the static-analysis and vulnerability gates.
'
\
'
check Run every local gate enforced by CI.
'
\
'
snapshot Build credential-free release artifacts.
'
\
'
release Refuse local publishing and print the official CI command.
'
\
'
verify-release Verify downloaded release artifacts (VERSION=vX.Y.Z).
'
\
'
release-artifacts Alias for release.
'
\
'
release-snapshot Alias for snapshot.
'
\
'
generate-sqlc Regenerate sqlc output.
'
\
'
clean Remove local build output.
'
build
:
@binary=
"
$(
BINARY
)
"
;
mkdir -p
"
$$
(dirname --
"
$$
binary
"
)
"
;
\
GOWORK=off go build -ldflags
"
-X github.com/openclaw/discrawl/internal/cli.version=
$(
VERSION
)
"
-o
"
$$
binary
"
./cmd/discrawl
test
:
GOWORK=off go
test
-count=1 ./...
test-large
:
@command -v jq
>
/dev/null
||
{
echo
'
test-large requires jq
'
;
exit
1
;
}
;
\
output_file=
"
$$
(mktemp)
"
;
trap
'
rm -f "$$output_file"
'
EXIT
;
\
test_status=0
;
\
DISCRAWL_TEST_LARGE=1 GOWORK=off go
test
-json -count=1 -run
'
^TestCatalogIntegrityProbeLargeCompleteFixture$$
'
-timeout=30m ./internal/store
>
"
$$
output_file
"
||
test_status=
$$?
;
\
cat
"
$$
output_file
"
;
\
[
"
$$
test_status
"
-eq
0 ]
||
exit
"
$$
test_status
"
;
\
jq -e
'
select(.Action == "pass" and .Test == "TestCatalogIntegrityProbeLargeCompleteFixture")
'
"
$$
output_file
"
>
/dev/null
test-race
:
GOWORK=off go
test
-count=1 -race ./...
test-coverage
:
GOWORK=off go
test
-count=1 -race ./... -coverprofile=coverage.out
@grep -v
'
^github.com/openclaw/discrawl/internal/store/storedb/
'
coverage.out
>
coverage.filtered.out
@total=
"
$$
(go tool cover -func=coverage.filtered.out | awk '/^total:/ { sub(/%
$$
/,
"
"
,
$$
3); print
$$
3 }')
"
;
\
awk -v total=
"
$$
total
"
'
BEGIN { if (total == "" || total + 0 < 85.0) { printf("coverage %s%% is below 85%%\n", total == "" ? "missing" : total); exit 1 } printf("coverage %.1f%%\n", total + 0) }
'
fmt
:
@changed=
"
$$
(GOWORK=off go run mvdan.cc/gofumpt@v0.12.0 -l .)
"
;
\
if
[
-n
"
$$
changed
"
]
;
then
printf
'
gofumpt wants changes in:\n%s\n
'
"
$$
changed
"
;
exit
1
;
fi
lint
:
GOWORK=off go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.14.0 run
GOWORK=off go vet ./...
GOWORK=off go tool staticcheck ./...
GOWORK=off go tool gosec -exclude=G101,G115,G202,G301,G304 ./...
GOWORK=off go tool govulncheck ./...
@output_file=
"
$$
(mktemp)
"
;
trap
'
rm -f "$$output_file"
'
EXIT
;
\
GOWORK=off go tool deadcode -test ./...
>
"
$$
output_file
"
;
\
if
[
-s
"
$$
output_file
"
]
;
then
cat
"
$$
output_file
"
;
exit
1
;
fi
tidy-check
:
GOWORK=off go mod verify
GOWORK=off go mod tidy
git diff --exit-code -- go.mod go.sum
smoke
: build
@test -n
"
$$
(
$(
BINARY
)
--version)
"
@
$(
BINARY
)
metadata --json
|
grep -q
'
"schema_version"
'
@
$(
BINARY
)
help
tui
|
grep -q
'
Usage: discrawl tui
'
check
: tidy-check fmt lint test-coverage smoke snapshot
snapshot
:
GOWORK=off goreleaser release --snapshot --clean --skip=publish
release
:
@./scripts/release-signed.sh
verify-release
:
@test -n
"
$(
VERSION
)
"
&&
[
"
$(
VERSION
)
"
!=
dev ]
||
(echo
"
usage: make verify-release VERSION=vX.Y.Z [ARTIFACT_DIR=dist]
"
>&2
;
exit
2)
@set -e
;
version=
"
$(
VERSION
)
"
;
release_version=
"
$$
{version#v}
"
;
\
for
arch
in
amd64 arm64
;
do
\
./scripts/verify-macos-release.sh
"
$$
version
"
\
"
$(
ARTIFACT_DIR
)
/discrawl_
$$
{release_version}_darwin_
$$
{arch}.tar.gz
"
\
"
$(
ARTIFACT_DIR
)
/checksums.txt
"
;
\
done
release-artifacts
: release
release-snapshot
: snapshot
generate-sqlc
:
./scripts/generate-sqlc.sh
clean
:
rm -rf -- bin dist coverage.out coverage.filtered.out
You can’t perform that action at this time.