Versions in this module Expand all Collapse all v1 v1.2.0 Aug 9, 2024 v1.1.0 Apr 9, 2024 Changes in this version + const EmptyTreeID + var ErrDirNotValid = errors.New(`invalid dir path, it can't be "",".", "..", start by "/" or contain "./"`) + var ErrFileNotValid = errors.New(...) + var ErrNoReleases = errors.New("no releases found") + var ErrNonexistentCommitHash = fmt.Errorf("nonexistent commit hash") + var MatchAllTags = regexp.MustCompile("") + type Commit struct + Author string + Files []string + Hash string + Message string + type CommitFilter struct + func NewCommitFilter(commitsGetter CommitsGetter, opts ...CommitFilterOptionFunc) (*CommitFilter, error) + func (s *CommitFilter) Commits(lastHash string) ([]Commit, error) + type CommitFilterOptionFunc func(s *CommitFilter) error + func ExcludedDependencies(deps ...string) CommitFilterOptionFunc + func ExcludedDirs(excludedDirs ...string) CommitFilterOptionFunc + func ExcludedFiles(excludedFiles ...string) CommitFilterOptionFunc + func IncludedDirs(includedDirs ...string) CommitFilterOptionFunc + func IncludedFiles(includedFiles ...string) CommitFilterOptionFunc + type CommitsGetter interface + Commits func(lastHash string) ([]Commit, error) + type RepoCommitsGetter struct + func NewRepoCommitsGetter(workDir string) *RepoCommitsGetter + func (s *RepoCommitsGetter) Commits(lastHash string) ([]Commit, error) + type RepoTagsGetter struct + func NewRepoTagsGetter(workDir string, opts ...TagOptionFunc) (*RepoTagsGetter, error) + func (s *RepoTagsGetter) Tags() ([]Tag, error) + type Tag struct + Hash string + Name string + type TagOptionFunc func(s *RepoTagsGetter) error + func TagsMatchingCommits(getter CommitsGetter) TagOptionFunc + func TagsMatchingRegex(regex string) TagOptionFunc + type TagSourceOptionFunc func(s *TagsSource) + func TagSourceReplacing(existing, replacement string) TagSourceOptionFunc + type TagsGetter interface + Tags func() ([]Tag, error) + type TagsSource struct + func NewTagsSource(tagsGetter TagsGetter, opts ...TagSourceOptionFunc) *TagsSource + func (s *TagsSource) LastVersionHash() (string, error) + func (s *TagsSource) Versions() ([]*semver.Version, error) + type TagsVersionGetter interface + LastVersionHash func() (string, error) + Versions func() ([]*semver.Version, error)