jfrog-cli: Go publish ignoring files causes checksum errors

When publishing a repo using a command such as:

rt gp go-dev-local $version --url=$HOST --user=$USER --password=$PASSWORD

certain files are not included in the archive uploaded to artifactory: the main culprit for me is .gitignore. This is causing some problems when pulling the package from artifactory, as it means the checksum no longer matches the value found in go.sum.

I think the code that does this may be:

// Returns a regex that match the following:
// 1. .git folder.
// 2. .gitignore file
// 3. .DS_Store
func getPathExclusionRegExp() (*regexp.Regexp, error) {
	excludePathsRegExp, err := regexp.Compile("(" + filepath.Join("^*", ".git", ".*$") + ")|(" + filepath.Join("^*", ".gitignore") + ")|(" + filepath.Join("^*", ".DS_Store") + ")")
	if err != nil {
		return nil, err
	}

	return excludePathsRegExp, nil
}

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

Sure @jackwhelpton - @Postyy created https://github.com/jfrog/jfrog-cli/pull/466 which fixes the checksum issue. We plan to merge it and get it released soon.