Skip to content

Commit

Permalink
sources.go
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1queee committed Oct 17, 2023
1 parent e7571fa commit 64c8f68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/apis/build/v1alpha1/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ type Source struct {
// +optional
Credentials *corev1.LocalObjectReference `json:"credentials,omitempty"`
}

// IsLocalCopyType tells if we have an entry of the type local
func IsLocalCopyType(sources []BuildSource) (int, bool) {
for i, bs := range sources {
if bs.Type == LocalCopy {
return i, true
}
}
return -1, false
}

0 comments on commit 64c8f68

Please sign in to comment.