mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #17200 from iiamabby/yamllint-install
Automate installation of yamllint
This commit is contained in:
commit
3a8e90c4c8
12
Makefile
12
Makefile
@ -63,7 +63,7 @@ fuzz:
|
|||||||
# Static analysis
|
# Static analysis
|
||||||
|
|
||||||
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
|
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
|
||||||
verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck \
|
verify-govet verify-license-header verify-receiver-name verify-mod-tidy \
|
||||||
verify-shellws verify-proto-annotations verify-genproto verify-yamllint \
|
verify-shellws verify-proto-annotations verify-genproto verify-yamllint \
|
||||||
verify-govet-shadow verify-markdown-marker
|
verify-govet-shadow verify-markdown-marker
|
||||||
fix: fix-bom fix-lint fix-yamllint
|
fix: fix-bom fix-lint fix-yamllint
|
||||||
@ -131,7 +131,15 @@ verify-genproto:
|
|||||||
|
|
||||||
.PHONY: verify-yamllint
|
.PHONY: verify-yamllint
|
||||||
verify-yamllint:
|
verify-yamllint:
|
||||||
|
ifeq (, $(shell which yamllint))
|
||||||
|
@echo "Installing yamllint..."
|
||||||
|
python3 -m venv bin/python
|
||||||
|
bin/python/bin/python3 -m pip install yamllint
|
||||||
|
./bin/python/bin/yamllint --config-file tools/.yamllint .
|
||||||
|
else
|
||||||
|
@echo "yamllint already installed..."
|
||||||
yamllint --config-file tools/.yamllint .
|
yamllint --config-file tools/.yamllint .
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: verify-govet-shadow
|
.PHONY: verify-govet-shadow
|
||||||
verify-govet-shadow:
|
verify-govet-shadow:
|
||||||
@ -154,7 +162,6 @@ endif
|
|||||||
|
|
||||||
GOLANGCI_LINT_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)
|
GOLANGCI_LINT_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)
|
||||||
.PHONY: install-golangci-lint
|
.PHONY: install-golangci-lint
|
||||||
|
|
||||||
install-golangci-lint:
|
install-golangci-lint:
|
||||||
ifeq (, $(shell which golangci-lint))
|
ifeq (, $(shell which golangci-lint))
|
||||||
$(shell curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_LINT_VERSION))
|
$(shell curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_LINT_VERSION))
|
||||||
@ -162,7 +169,6 @@ endif
|
|||||||
|
|
||||||
.PHONY: install-lazyfs
|
.PHONY: install-lazyfs
|
||||||
install-lazyfs: bin/lazyfs
|
install-lazyfs: bin/lazyfs
|
||||||
|
|
||||||
bin/lazyfs:
|
bin/lazyfs:
|
||||||
rm /tmp/lazyfs -rf
|
rm /tmp/lazyfs -rf
|
||||||
git clone --depth 1 --branch 0.2.0 https://github.com/dsrhaslab/lazyfs /tmp/lazyfs
|
git clone --depth 1 --branch 0.2.0 https://github.com/dsrhaslab/lazyfs /tmp/lazyfs
|
||||||
|
@ -40,6 +40,7 @@ if [[ $(protoc --version | cut -f2 -d' ') != "3.20.3" ]]; then
|
|||||||
|
|
||||||
download_url="https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-${file}.zip"
|
download_url="https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-${file}.zip"
|
||||||
echo "Running on ${arch}."
|
echo "Running on ${arch}."
|
||||||
|
mkdir -p bin
|
||||||
wget ${download_url} && unzip -p protoc-3.20.3-linux-${file}.zip bin/protoc > tmpFile && mv tmpFile bin/protoc
|
wget ${download_url} && unzip -p protoc-3.20.3-linux-${file}.zip bin/protoc > tmpFile && mv tmpFile bin/protoc
|
||||||
rm protoc-3.20.3-linux-${file}.zip
|
rm protoc-3.20.3-linux-${file}.zip
|
||||||
chmod +x bin/protoc
|
chmod +x bin/protoc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user