parent
4d665387fe
commit
08b122ea2c
19
gitConfig.go
19
gitConfig.go
|
@ -316,6 +316,7 @@ func (rs *RepoStatus) ScanGoSrc() {
|
|||
|
||||
// check if it is safe to remake the go.sum & go.mod files
|
||||
func (rs *RepoStatus) CheckSafeGoSumRemake() (bool, []string) {
|
||||
myGoSumS := rs.goSumStatus.String()
|
||||
if rs.ReadGoMod() {
|
||||
log.Log(INFO, "parsed go.mod", rs.realPath.String())
|
||||
} else {
|
||||
|
@ -347,12 +348,15 @@ func (rs *RepoStatus) CheckSafeGoSumRemake() (bool, []string) {
|
|||
log.Log(WARN, " username :"+username, userhash)
|
||||
log.Log(WARN, " username :"+username, userversion)
|
||||
if version == userversion {
|
||||
log.Log(WARN, " USER VERSIONS MATCH", version, userversion)
|
||||
if deprs.goSumStatus.String() == "BAD" {
|
||||
log.Log(WARN, " USER VERSION IS BAD!! return false")
|
||||
clean = append(clean, deprs.String())
|
||||
}
|
||||
log.Log(WARN, " USER VERSIONS MATCH", version, userversion, goSumS)
|
||||
clean = append(clean, deprs.String())
|
||||
} else {
|
||||
os.Unsetenv("GO111MODULE")
|
||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion, myGoSumS)
|
||||
log.Log(WARN, " IGNORE UNCHANGED REPO. RUNNING 'go get'", depname, userversion)
|
||||
err, output := rs.RunCmd([]string{"go", "get", depname + "@" + userversion})
|
||||
log.Log(WARN, " go get", depname, err, output)
|
||||
/*
|
||||
switch goSumS {
|
||||
case "SAFE":
|
||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||
|
@ -368,9 +372,12 @@ func (rs *RepoStatus) CheckSafeGoSumRemake() (bool, []string) {
|
|||
err, output := rs.RunCmd([]string{"go", "get", depname + "@" + userversion})
|
||||
log.Log(WARN, " go get", depname, err, output)
|
||||
default:
|
||||
log.Log(WARN, " USER VERSIONS MISMATCH", version, userversion)
|
||||
log.Log(WARN, " USER VERSIONS MISMATCH default", version, userversion)
|
||||
clean = append(clean, deprs.String())
|
||||
if myGoSumS == "UNCHANGED" {
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue