Skip to content

Commit af67c89

Browse files
authored
Merge pull request #1194 from monopole/moveKustomizeToCmd
Move kustomize main to cmd directory.
2 parents 71f44d6 + d2c9306 commit af67c89

File tree

6 files changed

+44
-55
lines changed

6 files changed

+44
-55
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.dll
55
*.so
66
*.dylib
7-
kustomize
87

98
# Test binary, build with `go test -c`
109
*.test

build/goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
project_name: kustomize
88
builds:
9-
- main: ./kustomize.go
9+
- main: ./cmd/kustomize/main.go
1010
binary: kustomize
1111
ldflags: -s -X sigs.k8s.io/kustomize/pkg/commands/misc.kustomizeVersion={{.Version}} -X sigs.k8s.io/kustomize/pkg/commands/misc.gitCommit={{.Commit}} -X sigs.k8s.io/kustomize/pkg/commands/misc.buildDate={{.Date}}
1212
goos:

cmd/kustomize/main.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2019 The Kubernetes Authors.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package main
5+
6+
import (
7+
"os"
8+
9+
"sigs.k8s.io/kustomize/pkg/commands"
10+
)
11+
12+
func main() {
13+
if err := commands.NewDefaultCommand().Execute(); err != nil {
14+
os.Exit(1)
15+
}
16+
os.Exit(0)
17+
}

docs/INSTALL.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,11 @@
33

44
## Installation
55

6-
On macOS, you can install kustomize with Homebrew package
7-
manager:
8-
9-
brew install kustomize
10-
11-
On windows, you can install kustomize with Chocolatey package
12-
manager.
13-
14-
choco install kustomize
15-
16-
For support on the chocolatey package and prior releases, please reference the following links:
17-
- [Choco Package](https://chocolatey.org/packages/kustomize)
18-
- [Package Source](https://github.com/kenmaglio/choco-kustomize)
19-
20-
21-
For all operating systems, download a binary from the
6+
For linux, macOs and Windows,
7+
download a binary from the
228
[release page].
239

24-
25-
Or try this to grab the latest official release
26-
using the command line:
27-
10+
Or try this command:
2811
```
2912
opsys=linux # or darwin, or windows
3013
curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest |\
@@ -36,9 +19,29 @@ mv kustomize_*_${opsys}_amd64 kustomize
3619
chmod u+x kustomize
3720
```
3821

39-
To install from head with [Go] v1.10.1 or higher:
22+
To install from head with [Go] v1.12 or higher:
4023

4124
<!-- @installkustomize @test -->
4225
```
43-
go get sigs.k8s.io/kustomize
26+
go install sigs.k8s.io/kustomize/cmd/kustomize
27+
```
28+
29+
### Other methods
30+
31+
#### macOS
32+
33+
```
34+
brew install kustomize
35+
```
36+
37+
#### windows
38+
4439
```
40+
choco install kustomize
41+
```
42+
43+
For support on the chocolatey package
44+
and prior releases, see:
45+
- [Choco Package](https://chocolatey.org/packages/kustomize)
46+
- [Package Source](https://github.com/kenmaglio/choco-kustomize)
47+

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tests, and should work with HEAD
99

1010
<!-- @installkustomize @test -->
1111
```
12-
go get sigs.k8s.io/kustomize
12+
go get sigs.k8s.io/kustomize/cmd/kustomize
1313
```
1414

1515
Basic Usage

kustomize.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)