Commit: 698e826971d5744c61d9b2e48cd8c75237e82a12 Parent: 67b20bc73f66850952910b4300eeecc04ff7bbac Author: Vi Grey Date: 2024-04-29 11:57 UTC Summary: Properly exclude files CHANGELOG.txt | 6 ++++++ src/flags.go | 20 +++++++++----------- src/gmi.go | 2 +- src/muninn.go | 5 +---- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cdc61f1..e693975 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.1.19] - 2024-04-29 + +### Fixed +- Files are now excluded properly + + ## [0.1.18] - 2024-04-29 ### Added diff --git a/src/flags.go b/src/flags.go index 77777e2..1266e84 100644 --- a/src/flags.go +++ b/src/flags.go @@ -9,17 +9,15 @@ import ( ) var ( - maxCommits int - inPath string - outPath string - txtOutPath string - basePath string - host string - linksExcludeExtension bool - help bool - version bool - excludeFiles bool - repository string + maxCommits int + inPath string + outPath string + txtOutPath string + basePath string + host string + help bool + version bool + repository string ) func handleFlags(args []string) (err error) { diff --git a/src/gmi.go b/src/gmi.go index 6362dea..b403db1 100644 --- a/src/gmi.go +++ b/src/gmi.go @@ -160,7 +160,7 @@ func writeRepoFilesGMI(repo repo, repoFiles []repoFile) { readmeFilePath, _ := readmeFileExists(repoFiles) licenseFilePath, _ := licenseFileExists(repoFiles) for x := range repoFiles { - if !excludeFiles || repoFiles[x].path == readmeFilePath || + if repoFiles[x].path == readmeFilePath || repoFiles[x].path == licenseFilePath { if err := os.MkdirAll(filepath.Join(outPath, "git", repo.name, "file", filepath.Dir(repoFiles[x].path)), 0755); err == nil { diff --git a/src/muninn.go b/src/muninn.go index c90b108..ba8bf97 100644 --- a/src/muninn.go +++ b/src/muninn.go @@ -10,7 +10,7 @@ import ( const ( PROGRAM = "muninn" - VERSION = "0.1.18" + VERSION = "0.1.19" ) func init() { @@ -71,9 +71,6 @@ func writeGitReposGmi(repoList []repo) { repoFiles, _ := getRepoFiles(repoList[x].path) repoCommits, _ := getRepoCommitsList(repoList[x].path) writeCommitLogGMI(repoList[x], repoCommits) - if !excludeFiles { - writeRepoFilesListGMI(repoList[x], repoFiles) - } writeRefsGMI(repoList[x], repoBranches, repoTags) writeCommitFilesGMI(repoList[x], repoCommits) writeRepoFilesGMI(repoList[x], repoFiles)