Skip to content

werf v1.2.7+fix5

Choose a tag to compare
@flant-team-sysdev flant-team-sysdev released this 24 Feb 20:27
· 4975 commits to main since this release


[docs] Basic bundles article in advanced documentation section


Rework ls tree and path matcher interface

[ls_tree] Change the LsTree function interface

// LsTree returns the Result with tree entries that satisfy the passed pathMatcher.
// The function works lazily and does not go through a tree directory unnecessarily.
// If the result should contain only regular files (without directories and submodules), you should use the allFiles parameter.
LsTree(ctx context.Context, repository *git.Repository, commit string, pathMatcher path_matcher.PathMatcher) (*Result, error) -> LsTree(ctx context.
Context, repository *git.Repository, commit string, pathMatcher path_matcher.PathMatcher, allFiles bool) (*Result, error)

[path_matcher] Remove the greedySearch parameter and change interface

There are the following changes in the PathMatcher interface:

  • Rename the MatchPath method to IsPathMatched
  • Split the ProcessDirOrSubmodulePath method into ShouldGoThrough and IsDirOrSubmodulePathMatched methods
// IsPathMatched checks for a complete matching of the path
IsPathMatched(string) bool

// ShouldGoThrough indicates that the directory or submodule path is not completely matched but may include matching files among the child files.
// The method returns false if the path is completely matched.
ShouldGoThrough(string) bool

// IsDirOrSubmodulePathMatched returns true if IsPathMatched or ShouldGoThrough.
// The method returns true if there is a possibility of containing the matching files among the child files.
IsDirOrSubmodulePathMatched(string) bool

[ls_tree] Remove the strict option in LsTree function

The option allowed to run ls tree for work tree with uninitialized submodules. In current versions, we always work with the service work tree, where the submodules must be initialized.


Linux amd64

Darwin amd64

Windows amd64