Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
prototransform/Makefile at main · bufbuild/prototransform · 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 }}
bufbuild
prototransform
Repository navigation
Code
Issues
Pull requests
4
(4)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
prototransform
/
Makefile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
90 lines (76 loc) · 2.95 KB
main
Breadcrumbs
prototransform
/
Makefile
Copy path
Top
File metadata and controls
Code
Blame
90 lines (76 loc) · 2.95 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
#
See https://tech.davis-hansson.com/p/make/
SHELL
:= bash
.DELETE_ON_ERROR
:
.SHELLFLAGS
:= -eu -o pipefail -c
.DEFAULT_GOAL
:= all
MAKEFLAGS
+= --warn-undefined-variables
MAKEFLAGS
+= --no-builtin-rules
MAKEFLAGS
+= --no-print-directory
BIN
:= .tmp/bin
COPYRIGHT_YEARS
:= 2023-2025
LICENSE_IGNORE
:= -e internal/testdata/
#
Set to use a different compiler. For example, `GO=go1.18rc1 make test`.
GO
?= go
BUF_VERSION
?= v1.50.0
GOLANGCI_LINT_VERSION
?= v2.12.2
.PHONY
: help
help
:
#
# Describe useful make targets
@grep -E
'
^[a-zA-Z_-]+:.*?## .*$$
'
$(
MAKEFILE_LIST
)
|
sort
|
awk
'
BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}
'
.PHONY
: all
all
:
#
# Build, test, and lint (default)
$(
MAKE
)
test
$(
MAKE
)
lint
.PHONY
: clean
clean
:
#
# Delete intermediate build artifacts
@
#
-X only removes untracked files, -d recurses into directories, -f actually removes files/dirs
git clean -Xdf
.PHONY
: test
test
: build
#
# Run unit tests
$(
GO
)
test
-vet=off -race -cover ./...
.PHONY
: build
build
: generate
#
# Build all packages
$(
GO
)
build ./...
.PHONY
: install
install
:
#
# Install all binaries
$(
GO
)
install ./...
.PHONY
: lint
lint
:
$(
BIN
)
/golangci-lint
#
# Lint Go and protobuf
$(
GO
)
vet ./...
$(
BIN
)
/golangci-lint run
.PHONY
: lintfix
lintfix
:
$(
BIN
)
/golangci-lint
#
# Automatically fix some lint errors
$(
BIN
)
/golangci-lint run --fix
.PHONY
: generate
generate
:
$(
BIN
)
/buf
$(
BIN
)
/license-header
#
# Regenerate code and licenses
rm -rf internal/testdata/gen internal/proto/gen
PATH=
$(
abspath
$(
BIN
)
)
cd
internal/testdata
&&
buf generate
&&
cd
../proto
&&
buf generate
@
#
We want to operate on a list of modified and new files, excluding
@
#
deleted and ignored files. git-ls-files can't do this alone. comm -23 takes
@
#
two files and prints the union, dropping lines common to both (-3) and
@
#
those only in the second file (-2). We make one git-ls-files call for
@
#
the modified, cached, and new (--others) files, and a second for the
@
#
deleted files.
comm -23
\
<(
git ls-files --cached --modified --others --no-empty-directory --exclude-standard
|
sort -u
|
grep -v
$(
LICENSE_IGNORE
)
)
\
<(
git ls-files --deleted
|
sort -u
)
|
\
xargs
$(
BIN
)
/license-header
\
--license-type apache
\
--copyright-holder
"
Buf Technologies, Inc.
"
\
--year-range
"
$(
COPYRIGHT_YEARS
)
"
.PHONY
: upgrade
upgrade
:
#
# Upgrade dependencies
go get -u -t ./...
&&
go mod tidy -v
.PHONY
: checkgenerate
checkgenerate
:
@
#
Used in CI to verify that `make generate` doesn't produce a diff.
test
-z
"
$$
(git status --porcelain | tee /dev/stderr)
"
$(
BIN
)
/buf
: Makefile
@mkdir -p
$(
@D
)
GOBIN=
$(
abspath
$(
@D
)
)
$(
GO
)
install github.com/bufbuild/buf/cmd/buf@
$(
BUF_VERSION
)
$(
BIN
)
/license-header
: Makefile
@mkdir -p
$(
@D
)
GOBIN=
$(
abspath
$(
@D
)
)
$(
GO
)
install
\
github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@
$(
BUF_VERSION
)
$(
BIN
)
/golangci-lint
: Makefile
@mkdir -p
$(
@D
)
GOBIN=
$(
abspath
$(
@D
)
)
$(
GO
)
install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@
$(
GOLANGCI_LINT_VERSION
)
You can’t perform that action at this time.