MCPcopy
hub / github.com/karol-broda/snitch / extractCommitFromVersion

Function extractCommitFromVersion

cmd/upgrade.go:615–624  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

613}
614
615func extractCommitFromVersion(version string) string {
616 matches := nixVersionPattern.FindStringSubmatch(version)
617 if len(matches) >= 2 {
618 return matches[1]
619 }
620 if commitHashPattern.MatchString(version) {
621 return version
622 }
623 return ""
624}
625
626func isNixDirty(version string) bool {
627 return strings.HasSuffix(version, "-dirty")

Callers 1

handleNixUpgradeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected