Replace glide with Go modules (#544)

* And attempt to build with modules and remove glide
* new tools.go file to get code-generator dependency + updated codegen + remove Glide files and update docs
This commit is contained in:
Dmitry Dolgov
2019-10-02 16:18:55 +02:00
committed by Felix Kunde
parent f0e29060b1
commit baae1887b3
21 changed files with 487 additions and 400 deletions
+19
View File
@@ -0,0 +1,19 @@
// +build tools
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools
import _ "k8s.io/code-generator"
+3 -3
View File
@@ -7,7 +7,7 @@ set -o pipefail
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ${GOPATH}/src/k8s.io/code-generator)}
vendor/k8s.io/code-generator/generate-groups.sh all \
bash "${CODEGEN_PKG}/generate-groups.sh" all \
github.com/zalando/postgres-operator/pkg/generated github.com/zalando/postgres-operator/pkg/apis \
acid.zalan.do:v1 \
--go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
"acid.zalan.do:v1" \
--go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt