-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: spacewander <[email protected]>
- Loading branch information
1 parent
d4cc5f4
commit 5d56213
Showing
85 changed files
with
5,507 additions
and
1,601 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "istio"] | ||
path = external/istio | ||
url = [email protected]:istio/istio |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
include etc/common.mk | ||
include common.mk | ||
|
||
GO_PROD_MODULES = api types controller plugins | ||
GO_MODULES = $(GO_PROD_MODULES) e2e | ||
|
@@ -44,7 +44,7 @@ gen-proto: dev-tools install-go-fmtter $(GO_TARGETS) | |
.PHONY: gen-crd-code | ||
gen-crd-code: $(LOCALBIN) install-go-fmtter | ||
test -s $(LOCALBIN)/client-gen || GOBIN=$(LOCALBIN) go install k8s.io/code-generator/cmd/[email protected] | ||
LOCALBIN=$(LOCALBIN) etc/gen-crd-code.sh | ||
LOCALBIN=$(LOCALBIN) tools/gen-crd-code.sh | ||
$(LOCALBIN)/gosimports -w -local ${PROJECT_NAME} ./types/pkg/client | ||
|
||
.PHONY: dev-tools | ||
|
@@ -79,17 +79,19 @@ lint-go: | |
|
||
.PHONY: fmt-go | ||
fmt-go: install-go-fmtter | ||
$(LOCALBIN)/gosimports -w -local ${PROJECT_NAME} . | ||
$(foreach PKG, $(GO_MODULES), \ | ||
pushd ./${PKG} && go mod tidy || exit 1; popd; \ | ||
pushd ./${PKG} && \ | ||
go mod tidy || exit 1; \ | ||
$(LOCALBIN)/gosimports -w -local ${PROJECT_NAME} . || exit 1; \ | ||
popd; \ | ||
) | ||
|
||
# Don't use `buf format` to format the protobuf files! Buf's code style is different from Envoy. | ||
# That will break lots of things. | ||
.PHONY: lint-proto | ||
lint-proto: $(LOCALBIN) | ||
test -x $(LOCALBIN)/buf || GOBIN=$(LOCALBIN) go install github.com/bufbuild/buf/cmd/[email protected] | ||
$(LOCALBIN)/buf lint | ||
$(LOCALBIN)/buf lint --exclude-path ./external | ||
|
||
.PHONY: fmt-proto | ||
fmt-proto: dev-tools | ||
|
@@ -99,7 +101,7 @@ fmt-proto: dev-tools | |
|
||
.PHONY: fmt-proto-local | ||
fmt-proto-local: | ||
find . -name '*.proto' -exec clang-format -i {} \+ | ||
find . -name '*.proto' | grep -v './external' | xargs clang-format -i | ||
|
||
.PHONY: install-license-checker | ||
install-license-checker: $(LOCALBIN) | ||
|
@@ -120,7 +122,7 @@ lint-spell: dev-tools | |
${DEV_TOOLS_IMAGE} \ | ||
make lint-spell-local | ||
|
||
CODESPELL = codespell --skip '.git,.idea,test-envoy,go.mod,go.sum,go.work.sum,*.svg,./site/public/**' --check-filenames --check-hidden --ignore-words ./.ignore_words | ||
CODESPELL = codespell --skip 'test-envoy,go.mod,go.sum,*.patch,*.svg,./site/public/**' --check-filenames --check-hidden --ignore-words ./.ignore_words $(shell ls -A | tr '\t' '\n' | grep -vE 'external|.git|.idea|go.work.sum') | ||
.PHONY: lint-spell-local | ||
lint-spell-local: | ||
$(CODESPELL) | ||
|
@@ -155,3 +157,11 @@ fmt: fmt-go fmt-proto | |
.PHONY: verify-example | ||
verify-example: | ||
cd ./examples/dev_your_plugin && ./verify.sh | ||
|
||
TARGET_ISTIO_DIR = $(shell pwd)/external/istio | ||
|
||
.PHONY: prebuild | ||
prebuild: | ||
git submodule update --init --recursive | ||
cd $(TARGET_ISTIO_DIR) && git status | grep -q "nothing to commit, working tree clean" || (echo "istio submodule is not clean, please commit your changes first"; exit 1) | ||
cd ./patch && ./apply-patch.sh $(TARGET_ISTIO_DIR) |
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
File renamed without changes.
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.