Skip to content

Commit

Permalink
Merge pull request #1194 from monopole/moveKustomizeToCmd
Browse files Browse the repository at this point in the history
Move kustomize main to cmd directory.
  • Loading branch information
monopole committed Jun 18, 2019
2 parents 71f44d6 + d2c9306 commit af67c89
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 55 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.dll
*.so
*.dylib
kustomize

# Test binary, build with `go test -c`
*.test
Expand Down
2 changes: 1 addition & 1 deletion build/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
project_name: kustomize
builds:
- main: ./kustomize.go
- main: ./cmd/kustomize/main.go
binary: kustomize
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}}
goos:
Expand Down
17 changes: 17 additions & 0 deletions cmd/kustomize/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0

package main

import (
"os"

"sigs.k8s.io/kustomize/pkg/commands"
)

func main() {
if err := commands.NewDefaultCommand().Execute(); err != nil {
os.Exit(1)
}
os.Exit(0)
}
47 changes: 25 additions & 22 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,11 @@

## Installation

On macOS, you can install kustomize with Homebrew package
manager:

brew install kustomize

On windows, you can install kustomize with Chocolatey package
manager.

choco install kustomize

For support on the chocolatey package and prior releases, please reference the following links:
- [Choco Package](https://chocolatey.org/packages/kustomize)
- [Package Source](https://github.com/kenmaglio/choco-kustomize)


For all operating systems, download a binary from the
For linux, macOs and Windows,
download a binary from the
[release page].


Or try this to grab the latest official release
using the command line:

Or try this command:
```
opsys=linux # or darwin, or windows
curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest |\
Expand All @@ -36,9 +19,29 @@ mv kustomize_*_${opsys}_amd64 kustomize
chmod u+x kustomize
```

To install from head with [Go] v1.10.1 or higher:
To install from head with [Go] v1.12 or higher:

<!-- @installkustomize @test -->
```
go get sigs.k8s.io/kustomize
go install sigs.k8s.io/kustomize/cmd/kustomize
```

### Other methods

#### macOS

```
brew install kustomize
```

#### windows

```
choco install kustomize
```

For support on the chocolatey package
and prior releases, see:
- [Choco Package](https://chocolatey.org/packages/kustomize)
- [Package Source](https://github.com/kenmaglio/choco-kustomize)

2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tests, and should work with HEAD

<!-- @installkustomize @test -->
```
go get sigs.k8s.io/kustomize
go get sigs.k8s.io/kustomize/cmd/kustomize
```

Basic Usage
Expand Down
30 changes: 0 additions & 30 deletions kustomize.go

This file was deleted.

0 comments on commit af67c89

Please sign in to comment.