-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: align Makefiles across folders
Reformatting Makefiles across folders to: - Use an APIVER variable for the API version - Break long commands into multiple lines to reduce the line lengths - Have all Makefiles have the same format Fixes: #457 Signed-off-by: Stephen Doyle <stephen.doyle@intel.com>
- Loading branch information
1 parent
29633d0
commit d6ec9de
Showing
8 changed files
with
197 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (C) 2022 Intel Corporation | ||
# Copyright (c) 2022 Dell Inc, or its subsidiaries. | ||
|
||
all: buflint apilint bufgen doc | ||
|
||
doc: | ||
rm -rf ./google | ||
rm -f ./v1/autogen.md | ||
mkdir -p ./v1 | ||
|
||
# protoc doesn't include annotation and http googleapis, so we have to get them here | ||
curl -kL https://github.com/googleapis/googleapis/archive/master.tar.gz | tar --strip=1 -zxvf - googleapis-master/google/api | ||
|
||
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh -v "${PWD}"/v1/:/out -w /out -v "${PWD}":/protos pseudomuto/protoc-gen-doc:1.5.1 -c "protoc -I /protos --doc_out=/out --doc_opt=markdown,autogen.md /protos/*.proto" | ||
|
||
rm -rf "${PWD}"/google | ||
|
||
apilint: | ||
curl -kL https://github.com/googleapis/googleapis/archive/master.tar.gz | tar --strip=1 -zxvf - googleapis-master/google/api | ||
docker run --user=$(id -u):$(id -g) --rm --entrypoint=sh -v "${PWD}":/out -w /out ghcr.io/docker-multiarch/google-api-linter:1.56.1 -c "api-linter /out/*.proto --output-format github --set-exit-status" | ||
rm -rf "${PWD}"/google | ||
|
||
buflint: | ||
docker run --rm -v "${PWD}":/out -w /out bufbuild/buf lint | ||
|
||
bufgen: | ||
docker run --rm -v "${PWD}/..":/base -v "${PWD}":/out -w /out msandersdell/bufbuild-go-gen:1.1.0 generate --template /base/buf.gen.yaml -o v1 | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (C) 2022 Intel Corporation | ||
# Copyright (c) 2022 Dell Inc, or its subsidiaries. | ||
|
||
APIVER = v1 | ||
|
||
all: buflint apilint bufgen doc | ||
|
||
doc: | ||
rm -rf ./google | ||
rm -f ./${APIVER}/autogen.md | ||
mkdir -p ./${APIVER} | ||
|
||
# protoc doesn't include annotation and http googleapis, so we have to get them here | ||
curl -kL https://github.com/googleapis/googleapis/archive/master.tar.gz | tar --strip=1 -zxvf - googleapis-master/google/api | ||
|
||
docker run --user=$$(id -u):$$(id -g) --rm --entrypoint=sh \ | ||
-v "${PWD}"/${APIVER}/:/out \ | ||
-w /out \ | ||
-v "${PWD}":/protos \ | ||
pseudomuto/protoc-gen-doc:1.5.1 -c "protoc -I /protos --doc_out=/out --doc_opt=markdown,autogen.md /protos/*.proto" | ||
|
||
rm -rf "${PWD}"/google | ||
|
||
apilint: | ||
curl -kL https://github.com/googleapis/googleapis/archive/master.tar.gz | tar --strip=1 -zxvf - googleapis-master/google/api | ||
docker run --user=$(id -u):$(id -g) --rm --entrypoint=sh \ | ||
-v "${PWD}":/out \ | ||
-w /out \ | ||
ghcr.io/docker-multiarch/google-api-linter:1.56.1 -c "api-linter /out/*.proto --output-format github --set-exit-status" | ||
rm -rf "${PWD}"/google | ||
|
||
buflint: | ||
docker run --rm -v "${PWD}":/out -w /out bufbuild/buf lint | ||
|
||
bufgen: | ||
docker run --rm \ | ||
-v "${PWD}/..":/base \ | ||
-v "${PWD}":/out \ | ||
-w /out \ | ||
msandersdell/bufbuild-go-gen:1.1.0 generate --template /base/buf.gen.yaml -o ${APIVER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.