зеркало из https://github.com/Azure/aks-engine.git
build: commit generated code files (#449)
* build: commit generated code files Keeping these files in the repository will help with vendoring and should make the package "go get"-able. * build: ignore generated files in code coverage * build: add "make validate-generated" target This should ensure go-bindata files are kept up to date. * fix: replace script with simpler git commands * fix: revise git diff command for generated file check
This commit is contained in:
Родитель
8ffcc1267d
Коммит
25915938f2
|
@ -6,7 +6,6 @@ coverage:
|
|||
precision: 2
|
||||
round: down
|
||||
range: "50...100"
|
||||
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
|
@ -27,4 +26,7 @@ parsers:
|
|||
comment:
|
||||
layout: "header, diff"
|
||||
behavior: default
|
||||
require_changes: no
|
||||
require_changes: no
|
||||
|
||||
ignore:
|
||||
- "**/*_generated.go"
|
||||
|
|
|
@ -13,13 +13,12 @@ _dist/
|
|||
bin/
|
||||
.env
|
||||
.coverprofile
|
||||
coverage.txt
|
||||
|
||||
test/junit/
|
||||
test/aks-engine-test/aks-engine-test.exe
|
||||
pkg/operations/junit.xml
|
||||
pkg/operations/kubernetesupgrade/junit.xml
|
||||
pkg/engine/templates.go
|
||||
pkg/i18n/translations.go
|
||||
|
||||
_logs/
|
||||
test/aks-engine-test/report/TestReport.json
|
||||
|
|
|
@ -52,6 +52,9 @@ jobs:
|
|||
- script: make validate-copyright-headers test-style
|
||||
displayName: Run linting rules
|
||||
workingDirectory: $(modulePath)
|
||||
- script: make validate-generated
|
||||
displayName: Check if generated code is up to date
|
||||
workingDirectory: $(modulePath)
|
||||
- script: make validate-dependencies
|
||||
displayName: Check if imports, Gopkg.toml, and Gopkg.lock are in sync
|
||||
workingDirectory: $(modulePath)
|
||||
|
|
5
Makefile
5
Makefile
|
@ -125,6 +125,11 @@ test: generate
|
|||
test-style:
|
||||
@scripts/validate-go.sh
|
||||
|
||||
.PHONY: validate-generated
|
||||
validate-generated: generate
|
||||
@echo "==> Checking generated files <=="
|
||||
! git diff --name-only pkg/ | grep _generated.go
|
||||
|
||||
.PHONY: test-e2e
|
||||
test-e2e:
|
||||
@test/e2e.sh
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package engine
|
||||
|
||||
//go:generate go-bindata -nometadata -pkg $GOPACKAGE -prefix ../../parts/ -o templates.go ../../parts/...
|
||||
//go:generate gofmt -s -l -w templates.go
|
||||
//go:generate go-bindata -nometadata -pkg $GOPACKAGE -prefix ../../parts/ -o templates_generated.go ../../parts/...
|
||||
//go:generate gofmt -s -l -w templates_generated.go
|
||||
// fileloader use go-bindata (https://github.com/go-bindata/go-bindata)
|
||||
// go-bindata is the way we handle embedded files, like binary, template, etc.
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -3,7 +3,7 @@
|
|||
|
||||
package i18n
|
||||
|
||||
//go:generate go-bindata -nometadata -pkg $GOPACKAGE -prefix ../../ -o translations.go ../../translations/...
|
||||
//go:generate gofmt -s -l -w translations.go
|
||||
//go:generate go-bindata -nometadata -pkg $GOPACKAGE -prefix ../../ -o translations_generated.go ../../translations/...
|
||||
//go:generate gofmt -s -l -w translations_generated.go
|
||||
// resourceloader use go-bindata (https://github.com/go-bindata/go-bindata)
|
||||
// go-bindata is the way we handle embedded files, like binary, template, etc.
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче