MCPcopy Create free account
hub / github.com/ddev/ddev / GetMutagenConfigFileHash

Function GetMutagenConfigFileHash

pkg/ddevapp/mutagen.go:141–150  ·  view source on GitHub ↗

GetMutagenConfigFileHash returns the SHA1 hash of the mutagen.yml

(app *DdevApp)

Source from the content-addressed store, hash-verified

139
140// GetMutagenConfigFileHash returns the SHA1 hash of the mutagen.yml
141func GetMutagenConfigFileHash(app *DdevApp) (string, error) {
142 f := GetMutagenConfigFilePath(app)
143 // Create hash based on mutagen.yml file contents, location,
144 //and global config
145 hash, err := fileutil.FileHash(f, globalconfig.GetGlobalDdevDirLocation())
146 if err != nil {
147 return "", err
148 }
149 return hash, nil
150}
151
152// GetMutagenConfigFile looks to see if there's a project .mutagen.yml
153// If nothing is found, returns empty

Callers 2

Calls 3

FileHashFunction · 0.92
GetGlobalDdevDirLocationFunction · 0.92
GetMutagenConfigFilePathFunction · 0.85

Tested by

no test coverage detected