Compare commits

...

9 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
92390eabe4 Merge pull request #1663 from chaosteil/pluginloadfail
Refactor exec plugin load to error if plugin isn't executable
2019-10-24 11:55:41 -07:00
Jeff Regan
7b8fa51ec5 More fixes to releasing instructions. 2019-10-24 11:50:34 -07:00
Jeff Regan
af8e17a1ed Fix curl command in INSTALL.md 2019-10-24 11:34:09 -07:00
Jeff Regan
e2eeb90639 Update INSTALL.md 2019-10-24 11:23:21 -07:00
Jeff Regan
1704977a4b Explain using go to install kustomize. 2019-10-24 11:08:21 -07:00
Kubernetes Prow Robot
7050c6a7b6 Merge pull request #1688 from monopole/moveKustBackToV3
Move kustomize back to v3
2019-10-24 10:45:13 -07:00
Jeffrey Regan
02f9b98b5a Move kustomize back to v3 2019-10-24 10:32:11 -07:00
Jeff Regan
ce7ebe3299 Make all releases draft by default 2019-10-23 17:03:01 -07:00
Dominykas Djacenko
a4784ee5ec Refactor exec plugin load to error if plugin isn't executable 2019-10-21 19:49:27 -07:00
43 changed files with 124 additions and 91 deletions

View File

@@ -44,8 +44,15 @@ type ExecPlugin struct {
h *resmap.PluginHelpers
}
func NewExecPlugin(p string) *ExecPlugin {
return &ExecPlugin{path: p}
func NewExecPlugin(p string) (*ExecPlugin, error) {
f, err := os.Stat(p)
if err != nil {
return nil, err
}
if f.Mode()&0111 == 0000 {
return nil, fmt.Errorf("unable to execute plugin on path: %s", p)
}
return &ExecPlugin{path: p}, nil
}
func (p *ExecPlugin) Path() string {
@@ -60,15 +67,6 @@ func (p *ExecPlugin) Cfg() []byte {
return p.cfg
}
// isAvailable checks to see if the plugin is available
func (p *ExecPlugin) IsAvailable() bool {
f, err := os.Stat(p.path)
if os.IsNotExist(err) {
return false
}
return f.Mode()&0111 != 0000
}
func (p *ExecPlugin) Config(h *resmap.PluginHelpers, config []byte) error {
p.h = h
p.cfg = config

View File

@@ -5,6 +5,7 @@ package execplugin_test
import (
"fmt"
"os"
"strings"
"testing"
@@ -15,7 +16,7 @@ import (
"sigs.k8s.io/kustomize/api/plugins/loader"
"sigs.k8s.io/kustomize/api/resmap"
"sigs.k8s.io/kustomize/api/resource"
"sigs.k8s.io/kustomize/api/testutils/valtest"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
"sigs.k8s.io/kustomize/api/types"
)
@@ -43,10 +44,13 @@ s/$BAR/bar/g
\ \ \
`))
p := NewExecPlugin(
p, err := NewExecPlugin(
loader.AbsolutePluginPath(
config.DefaultPluginConfig(),
pluginConfig.OrgId()))
if err != nil {
t.Fatalf("unexpected error: %v", err.Error())
}
yaml, err := pluginConfig.AsYAML()
if err != nil {
@@ -114,7 +118,10 @@ func strptr(s string) *string {
}
func TestUpdateResourceOptions(t *testing.T) {
p := NewExecPlugin("")
p, err := NewExecPlugin("")
if !os.IsNotExist(err) {
t.Fatalf("unexpected error: %v", err.Error())
}
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
in := resmap.New()
expected := resmap.New()
@@ -159,7 +166,10 @@ func TestUpdateResourceOptions(t *testing.T) {
}
func TestUpdateResourceOptionsWithInvalidHashAnnotationValues(t *testing.T) {
p := NewExecPlugin("")
p, err := NewExecPlugin("")
if !os.IsNotExist(err) {
t.Fatalf("unexpected error: %v", err.Error())
}
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
cases := []string{
"",

View File

@@ -5,6 +5,7 @@ package loader
import (
"fmt"
"os"
"path/filepath"
"plugin"
"reflect"
@@ -145,10 +146,13 @@ func (l *Loader) makeBuiltinPlugin(r resid.Gvk) (resmap.Configurable, error) {
}
func (l *Loader) loadPlugin(resId resid.ResId) (resmap.Configurable, error) {
p := execplugin.NewExecPlugin(l.absolutePluginPath(resId))
if p.IsAvailable() {
p, err := execplugin.NewExecPlugin(l.absolutePluginPath(resId))
if err == nil {
return p, nil
}
if err != nil && !os.IsNotExist(err) {
return nil, err
}
c, err := l.loadGoPlugin(resId)
if err != nil {
return nil, err

View File

@@ -21,8 +21,25 @@ curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest |
grep $opsys |\
cut -d '"' -f 4 |\
xargs curl -O -L
mv kustomize_kustomize\.v*_${opsys}_amd64 kustomize
chmod u+x kustomize
tar xzf ./kustomize_v*_${opsys}_amd64.tar.gz
./kustomize version
```
## Try `go`
This method is more to show off how the `go` tool works,
than for any practical purpose. A kustomize developer should
clone the repo (see next section), and CI/CD scripts should
download a specific ready-to-run executable rather than
rely on the `go` tool.
Install the latest kustomize binary in the v3 series to `$GOPATH/bin`:
```
go install sigs.k8s.io/kustomize/kustomize/v3
```
Install a specific version:
```
go get sigs.k8s.io/kustomize/kustomize/v3@v3.3.0
```
## Build the kustomize CLI from local source
@@ -50,15 +67,6 @@ git checkout kustomize/v3.2.3
### Other methods
#### Use go get
This works poorly with existing `Go` package installations at the
moment, since kustomize switched over to Go modules but hasn't
historically followed semver with respect to its API.
This is being [fixed](versioningPolicy.md), after which
`go get` should work correctly.
#### macOS
```

View File

@@ -1,4 +1,4 @@
module sigs.k8s.io/kustomize/kustomize
module sigs.k8s.io/kustomize/kustomize/v3
go 1.13

View File

@@ -202,7 +202,6 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY=
k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize/api v0.1.1 h1:W2dWXex2MhF4/EZNokZllvet2RejCHqdAFklufN7VTg=
sigs.k8s.io/kustomize/api v0.1.1/go.mod h1:FyfJD1q1QMjC/TvK78b6cCtZB+mbpnGIo9YOvbucJes=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=

View File

@@ -16,11 +16,11 @@ import (
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/api/resmap"
"sigs.k8s.io/kustomize/api/resource"
"sigs.k8s.io/kustomize/kustomize/internal/commands/build"
"sigs.k8s.io/kustomize/kustomize/internal/commands/config"
"sigs.k8s.io/kustomize/kustomize/internal/commands/create"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit"
"sigs.k8s.io/kustomize/kustomize/internal/commands/version"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/build"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/config"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/create"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/version"
)
// NewDefaultCommand returns the default (aka root) command for kustomize command.

View File

@@ -13,8 +13,8 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
type createFlags struct {

View File

@@ -10,7 +10,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
var factory = kunstruct.NewKunstructuredFactoryImpl()

View File

@@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type addBaseOptions struct {

View File

@@ -8,8 +8,8 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -10,8 +10,8 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
// kindOfAdd is the kind of metadata being added: label or annotation

View File

@@ -9,8 +9,8 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func makeKustomization(t *testing.T) *types.Kustomization {

View File

@@ -9,9 +9,9 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/patch"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
type addPatchOptions struct {

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -9,8 +9,8 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
type addResourceOptions struct {

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -8,7 +8,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
// newCmdAddConfigMap returns a new command.

View File

@@ -8,7 +8,7 @@ import (
"strings"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
// flagsAndArgs encapsulates the options for add secret/configmap commands.

View File

@@ -8,7 +8,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
// newCmdAddSecret returns a new command.

View File

@@ -9,10 +9,10 @@ import (
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/kv"
"sigs.k8s.io/kustomize/api/loader"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/add"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/fix"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/remove"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/set"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/add"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/fix"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/remove"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/set"
)
// NewCmdEdit returns an instance of 'edit' subcommand.

View File

@@ -6,7 +6,7 @@ package fix
import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
// NewCmdFix returns an instance of 'fix' subcommand.

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func TestFix(t *testing.T) {

View File

@@ -11,7 +11,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
// kindOfAdd is the kind of metadata being added: label or annotation

View File

@@ -11,8 +11,8 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func makeKustomizationFS() filesys.FileSystem {

View File

@@ -10,9 +10,9 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/patch"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/internal/commands/util"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/util"
)
type removePatchOptions struct {

View File

@@ -9,8 +9,8 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/edit/patch"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/edit/patch"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type removeResourceOptions struct {

View File

@@ -10,7 +10,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func TestRemoveResources(t *testing.T) {

View File

@@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type setNamePrefixOptions struct {

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type setNameSuffixOptions struct {

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -13,7 +13,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type setImageOptions struct {

View File

@@ -9,7 +9,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func TestSetImage(t *testing.T) {

View File

@@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type setNamespaceOptions struct {

View File

@@ -10,7 +10,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
const (

View File

@@ -12,7 +12,7 @@ import (
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kustomize/internal/commands/kustfile"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands/kustfile"
)
type setReplicasOptions struct {

View File

@@ -9,7 +9,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/api/filesys"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func TestSetReplicas(t *testing.T) {

View File

@@ -11,7 +11,7 @@ import (
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/pgmconfig"
"sigs.k8s.io/kustomize/api/types"
testutils_test "sigs.k8s.io/kustomize/kustomize/internal/commands/testutils"
testutils_test "sigs.k8s.io/kustomize/kustomize/v3/internal/commands/testutils"
)
func TestFieldOrder(t *testing.T) {

View File

@@ -7,7 +7,7 @@ package main
import (
"os"
"sigs.k8s.io/kustomize/kustomize/internal/commands"
"sigs.k8s.io/kustomize/kustomize/v3/internal/commands"
)
func main() {

View File

@@ -38,7 +38,8 @@ files.
#### Packages
There's only one package in this module. It's called `main`,
There's only one public package in this module.
It's called `main`, it's therefore unimportable,
and it holds the _kustomize_ executable.
@@ -69,18 +70,18 @@ Go consumers of this API will have a `go.mod` file
requiring this module at a particular tag, e.g.
```
require sigs.k8s.io/kustomize/api v0.0.1
require sigs.k8s.io/kustomize/api v0.1.0
```
#### Release artifacts
This is a Go library only release, so the only
artifact per se is the repo tag, in the form `v4.3.2`,
This is a Go library-only release, so the only
artifact per se is the repo tag, in the form `api/v1.2.3`,
that API clients can `require` from their `go.mod` file.
Release notes should appear on the [release page].
There's an executable called `api`, which, if
There's a toy executable called `api`, which, if
run, prints the API release provenance data, but it's of
no practical use to an API client.
@@ -92,14 +93,14 @@ linkable library code.
#### Packages
There's only one package in this module. It's called `main`,
There's only one package in this module.
It's called `main`, it's therefore unimportable,
and it holds the _pluginator_ executable.
At the time of writing this binary is only of
interest to someone writing a new builtin
transformer or generator. See the [plugin
documentation](../docs/plugins).
Its dependence on the API is primarily for
plugin-related constants, not logic, and will
only change if there's some change in how
@@ -113,6 +114,18 @@ The tag appears in the URL, e.g. [pluginator/v1.0.0].
## Release procedure
> TODO: script what follows, so someone can enter
> ```
> go run ./releasing/release.go kustomize minor
> # or:
> # go run ./releasing/release.go api patch
> # go run ./releasing/release.go pluginator minor
> ```
> The program would look at the existing remote tags,
> confirm sanity and increment the appropriate major/minor/patch
> component, create the right branch and tag, etc.
> No more bash please.
At any given moment, the repository's master branch is
passing all its tests and contains code one could release.
@@ -151,7 +164,7 @@ Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
| major | minor | patch |
| :---: | :---: | :---: |
| API change | enhancements | bug fixes |
| manual update | OK to auto-update | OK to auto-update |
| manual update | maybe auto-update | auto-update encouraged |
- If there are only bug fixes or refactors, increment `patch` from whatever it is now.
- If there are new features, increment `minor`.

View File

@@ -49,6 +49,7 @@ release:
github:
owner: kubernetes-sigs
name: kustomize
draft: true
builds:
- ldflags: >
-s