Skip to content

Commit 46bc43f

Browse files
authored
Merge pull request #60 from dmcgowan/exclude-paths
Add exclude paths option to avoid commits in submodules
2 parents 72bc66d + d9763a7 commit 46bc43f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ type release struct {
106106
ProjectName string `toml:"project_name"`
107107
GithubRepo string `toml:"github_repo"`
108108
SubPath string `toml:"sub_path"`
109+
ExcludePaths []string `toml:"exclude_paths"`
109110
Commit string `toml:"commit"`
110111
Previous string `toml:"previous"`
111112
PreRelease bool `toml:"pre_release"`
@@ -251,6 +252,11 @@ This tool should run from the root of the project repository for a new release.
251252
if r.SubPath != "" {
252253
gitSubpaths = append(gitSubpaths, r.SubPath)
253254
}
255+
if len(r.ExcludePaths) > 0 {
256+
for _, p := range r.ExcludePaths {
257+
gitSubpaths = append(gitSubpaths, fmt.Sprintf(":^%s", p))
258+
}
259+
}
254260

255261
mailmapPath, err := filepath.Abs(".mailmap")
256262
if err != nil {

0 commit comments

Comments
 (0)