Skip to content

werf v1.2.7+fix5

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

Docs

[docs] Basic bundles article in advanced documentation section

https://werf.io/v1.2-alpha/documentation/advanced/bundles.html

Internals

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.

Installation

Linux amd64

Darwin amd64

Windows amd64