Skip to content

Commit ca1929a

Browse files
committed
Remove grep's dependence on apimachinery.
1 parent a13ef4d commit ca1929a

File tree

14 files changed

+2113
-83
lines changed

14 files changed

+2113
-83
lines changed

cmd/config/Makefile

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2019 The Kubernetes Authors.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
.PHONY: generate license fix vet fmt test build tidy
4+
.PHONY: generate license fix vet fmt test build tidy clean
55

66
GOBIN := $(shell go env GOPATH)/bin
77

@@ -11,6 +11,9 @@ $(GOBIN)/addlicense:
1111
$(GOBIN)/golangci-lint:
1212
go get github.com/golangci/golangci-lint/cmd/[email protected]
1313

14+
$(GOBIN)/k8scopy:
15+
( cd ../k8scopy; go install . )
16+
1417
$(GOBIN)/mdtogo:
1518
go get sigs.k8s.io/kustomize/cmd/mdtogo
1619

@@ -19,11 +22,18 @@ build:
1922

2023
all: build license fix vet fmt test lint tidy
2124

22-
generate: $(GOBIN)/mdtogo
25+
k8sGenDir := internal/commands/internal/k8sgen/pkg
26+
27+
generate: $(GOBIN)/mdtogo $(GOBIN)/k8scopy
2328
GOBIN=$(GOBIN) go generate ./...
2429

30+
clean:
31+
rm -rf $(k8sGenDir)
32+
2533
lint: $(GOBIN)/golangci-lint
26-
$(GOBIN)/golangci-lint run ./...
34+
$(GOBIN)/golangci-lint \
35+
--skip-dirs $(k8sGenDir) \
36+
run ./...
2737

2838
license: $(GOBIN)/addlicense
2939
$(GOBIN)/addlicense \

cmd/config/go.mod

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ go 1.15
55
require (
66
github.com/go-errors/errors v1.0.1
77
github.com/go-openapi/spec v0.19.5
8+
github.com/gogo/protobuf v1.3.1
89
github.com/google/go-cmp v0.5.2 // indirect
10+
github.com/google/uuid v1.1.2 // indirect
911
github.com/kr/text v0.2.0 // indirect
1012
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
1113
github.com/olekukonko/tablewriter v0.0.4
1214
github.com/spf13/cobra v1.0.0
1315
github.com/stretchr/testify v1.6.1
14-
golang.org/x/net v0.0.0-20200625001655-4c5254603344 // indirect
16+
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
17+
golang.org/x/text v0.3.4 // indirect
1518
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
1619
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
17-
k8s.io/apimachinery v0.18.10
20+
gopkg.in/inf.v0 v0.9.1
1821
sigs.k8s.io/kustomize/kyaml v0.10.7
1922
)

cmd/config/go.sum

+9-77
Large diffs are not rendered by default.

cmd/config/internal/commands/grep.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"strings"
1111

1212
"github.com/spf13/cobra"
13-
"k8s.io/apimachinery/pkg/api/resource"
1413
"sigs.k8s.io/kustomize/cmd/config/ext"
14+
"sigs.k8s.io/kustomize/cmd/config/internal/commands/internal/k8sgen/pkg/api/resource"
1515
"sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands"
1616
"sigs.k8s.io/kustomize/cmd/config/runner"
1717
"sigs.k8s.io/kustomize/kyaml/kio"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2020 The Kubernetes Authors.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
// All code below this directory is generated.
5+
// See {repo}/cmd/k8scopy/main.go for more info.
6+
//go:generate k8scopy k8scopy.yaml internal/commands
7+
package k8sgen
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2020 The Kubernetes Authors.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# The files to vendor (copy).
5+
# See {repo}/cmd/k8scopy/main.go for more info.
6+
module: k8s.io/apimachinery
7+
version: v0.18.10
8+
packages:
9+
- name: pkg/api/resource
10+
files:
11+
- amount.go
12+
- generated.pb.go
13+
- math.go
14+
- quantity.go
15+
- quantity_proto.go
16+
- scale_int.go
17+
- suffix.go
18+
- zz_generated.deepcopy.go

0 commit comments

Comments
 (0)