Revert "feat: add commit HASH to extra v2"

This reverts commit cb8592a567.
This commit is contained in:
liruichen 2023-09-07 19:04:09 +08:00
parent cb8592a567
commit 5666ec4b51
3 changed files with 1 additions and 9 deletions

View File

@ -115,7 +115,7 @@ func register (host string) {
time.Sleep(waitDelay)
continue
}
register_extra = os.Getenv("ECHO_APP_ID") + {{.CommitID}}
// 注册,直接将元信息放在 ws 地址中
v := url.Values{}
v.Set("hostname", ps.hostname)

View File

@ -50,7 +50,6 @@ type Build struct {
Pkgs map[string]*Package
GlobalCoverVarImportPath string
GlobalCoverVarImportPathDir string
CommitID string
}
// NewBuild creates a Build struct

View File

@ -64,13 +64,6 @@ func (b *Build) readProjectMetaInfo() {
// get GlobalCoverVarImportPath
b.GlobalCoverVarImportPath = path.Join(b.ImportPath, TmpFolderName(b.CurModProjectDir))
log.Donef("project meta information parsed")
cmd := exec.Command("git", "describe", "--abbrev=8", "--always")
output, err := cmd.Output()
if err != nil {
log.Errorf("git describe Error:", err)
} else {
b.CommitID = string(output)
}
}
// displayProjectMetaInfo prints basic infomation of this project to stdout