Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:Running: Release v0.2.2 #605

Merged
merged 16 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions hack/release/release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ NEWLINE="
"
head_commit=$(git rev-parse HEAD)
while read commit_word commit; do
if [[ -z ${commit_word} ]]; then
# skip terminating blank lines
continue
fi
read title
if [[ ${title} == "Merge branch '"*"' into release-"* ]]; then
# skip temporary merge commits for calculating release notes
continue
fi

read # skip the blank line
read prefix body

Expand Down
95 changes: 95 additions & 0 deletions pkg/client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,21 @@ func (o *CreateOptions) ApplyOptions(opts []CreateOption) *CreateOptions {
return o
}

// ApplyToCreate implements CreateOption
func (o *CreateOptions) ApplyToCreate(co *CreateOptions) {
if o.DryRun != nil {
co.DryRun = o.DryRun
}
if o.FieldManager != "" {
co.FieldManager = o.FieldManager
}
if o.Raw != nil {
co.Raw = o.Raw
}
}

var _ CreateOption = &CreateOptions{}

// CreateDryRunAll sets the "dry run" option to "all".
//
// Deprecated: Use DryRunAll
Expand Down Expand Up @@ -211,6 +226,27 @@ func (o *DeleteOptions) ApplyOptions(opts []DeleteOption) *DeleteOptions {
return o
}

var _ DeleteOption = &DeleteOptions{}

// ApplyToDelete implements DeleteOption
func (o *DeleteOptions) ApplyToDelete(do *DeleteOptions) {
if o.GracePeriodSeconds != nil {
do.GracePeriodSeconds = o.GracePeriodSeconds
}
if o.Preconditions != nil {
do.Preconditions = o.Preconditions
}
if o.PropagationPolicy != nil {
do.PropagationPolicy = o.PropagationPolicy
}
if o.Raw != nil {
do.Raw = o.Raw
}
if o.DryRun != nil {
do.DryRun = o.DryRun
}
}

// GracePeriodSeconds sets the grace period for the deletion
// to the given number of seconds.
type GracePeriodSeconds int64
Expand Down Expand Up @@ -273,6 +309,24 @@ type ListOptions struct {
Raw *metav1.ListOptions
}

var _ ListOption = &ListOptions{}

// ApplyToList implements ListOption for ListOptions
func (o *ListOptions) ApplyToList(lo *ListOptions) {
if o.LabelSelector != nil {
lo.LabelSelector = o.LabelSelector
}
if o.FieldSelector != nil {
lo.FieldSelector = o.FieldSelector
}
if o.Namespace != "" {
lo.Namespace = o.Namespace
}
if o.Raw != nil {
lo.Raw = o.Raw
}
}

// AsListOptions returns these options as a flattened metav1.ListOptions.
// This may mutate the Raw field.
func (o *ListOptions) AsListOptions() *metav1.ListOptions {
Expand Down Expand Up @@ -422,6 +476,21 @@ func (o *UpdateOptions) ApplyOptions(opts []UpdateOption) *UpdateOptions {
return o
}

var _ UpdateOption = &UpdateOptions{}

// ApplyToUpdate implements UpdateOption
func (o *UpdateOptions) ApplyToUpdate(uo *UpdateOptions) {
if o.DryRun != nil {
uo.DryRun = o.DryRun
}
if o.FieldManager != "" {
uo.FieldManager = o.FieldManager
}
if o.Raw != nil {
uo.Raw = o.Raw
}
}

// UpdateDryRunAll sets the "dry run" option to "all".
//
// Deprecated: Use DryRunAll
Expand Down Expand Up @@ -479,6 +548,24 @@ func (o *PatchOptions) AsPatchOptions() *metav1.PatchOptions {
return o.Raw
}

var _ PatchOption = &PatchOptions{}

// ApplyToPatch implements PatchOptions
func (o *PatchOptions) ApplyToPatch(po *PatchOptions) {
if o.DryRun != nil {
po.DryRun = o.DryRun
}
if o.Force != nil {
po.Force = o.Force
}
if o.FieldManager != "" {
po.FieldManager = o.FieldManager
}
if o.Raw != nil {
po.Raw = o.Raw
}
}

// ForceOwnership indicates that in case of conflicts with server-side apply,
// the client should acquire ownership of the conflicting field. Most
// controllers should use this.
Expand Down Expand Up @@ -518,4 +605,12 @@ func (o *DeleteAllOfOptions) ApplyOptions(opts []DeleteAllOfOption) *DeleteAllOf
return o
}

var _ DeleteAllOfOption = &DeleteAllOfOptions{}

// ApplyToDeleteAllOf implements DeleteAllOfOption
func (o *DeleteAllOfOptions) ApplyToDeleteAllOf(do *DeleteAllOfOptions) {
o.ApplyToList(&do.ListOptions)
o.ApplyToDelete(&do.DeleteOptions)
}

// }}}
Loading