mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
Fix lint error
Signed-off-by: Arkadii Yakovets <ark@victoriametrics.com>
This commit is contained in:
parent
08de878047
commit
4605a72684
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ func getTag() (string, error) {
|
||||||
if _, ok := err.(*exec.ExitError); ok {
|
if _, ok := err.(*exec.ExitError); ok {
|
||||||
gitDiffStdOut, _ := execCommand("git diff-index -u HEAD").Output()
|
gitDiffStdOut, _ := execCommand("git diff-index -u HEAD").Output()
|
||||||
hashGenerator := sha1.New()
|
hashGenerator := sha1.New()
|
||||||
io.WriteString(hashGenerator, string(gitDiffStdOut))
|
_, err := io.WriteString(hashGenerator, string(gitDiffStdOut))
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
sha1Hex := fmt.Sprintf("%x", hashGenerator.Sum(nil)[0:4])
|
sha1Hex := fmt.Sprintf("%x", hashGenerator.Sum(nil)[0:4])
|
||||||
tag = strings.Join([]string{tag, "-dirty-", sha1Hex}, "")
|
tag = strings.Join([]string{tag, "-dirty-", sha1Hex}, "")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue