Skip to content

Commit f92b169

Browse files
committed
test
1 parent f175c07 commit f92b169

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

elastic-agent/pkg/release/version.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
package release
1919

2020
import (
21-
"github.com/elastic/elastic-agent-poc/elastic-agent/version"
2221
"strconv"
2322
"strings"
2423
"time"
24+
25+
"github.com/elastic/elastic-agent-poc/elastic-agent/version"
2526
)
2627

2728
const (

magefile.go

+9-11
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ func Notice() error {
9494
fmt.Println(">> Generating NOTICE")
9595
fmt.Println(">> fmt - go mod tidy")
9696
err := sh.RunV("go", "mod", "tidy", "-v")
97-
if err!= nil {
97+
if err != nil {
9898
return errors.Wrap(err, "failed running go mod tidy, please fix the issues reported")
9999
}
100100
fmt.Println(">> fmt - go mod download")
101101
err = sh.RunV("go", "mod", "download")
102-
if err!= nil {
102+
if err != nil {
103103
return errors.Wrap(err, "failed running go mod download, please fix the issues reported")
104104
}
105105
fmt.Println(">> fmt - go list")
@@ -108,8 +108,8 @@ func Notice() error {
108108
return errors.Wrap(err, "failed running go list, please fix the issues reported")
109109
}
110110
fmt.Println(">> fmt - go run")
111-
cmd := exec.Command("go", "run", "go.elastic.co/go-licence-detector", "-includeIndirect", "-rules", "dev-tools/notice/rules.json" , "-overrides", "dev-tools/notice/overrides.json", "-noticeTemplate", "dev-tools/notice/NOTICE.txt.tmpl",
112-
"-noticeOut", "NOTICE.txt", "-depsOut","\"\"")
111+
cmd := exec.Command("go", "run", "go.elastic.co/go-licence-detector", "-includeIndirect", "-rules", "dev-tools/notice/rules.json", "-overrides", "dev-tools/notice/overrides.json", "-noticeTemplate", "dev-tools/notice/NOTICE.txt.tmpl",
112+
"-noticeOut", "NOTICE.txt", "-depsOut", "\"\"")
113113
stdin, err := cmd.StdinPipe()
114114
if err != nil {
115115
return errors.Wrap(err, "failed running go run, please fix the issues reported")
@@ -128,31 +128,29 @@ func Notice() error {
128128
if err != nil {
129129
return errors.Wrap(err, "failed combined output, please fix the issues reported")
130130
}
131-
return nil
131+
return nil
132132
}
133133

134-
135134
func CheckNoChanges() error {
136135
fmt.Println(">> fmt - go run")
137136
err := sh.RunV("go", "mod", "tidy", "-v")
138-
if err!= nil {
137+
if err != nil {
139138
return errors.Wrap(err, "failed running go mod tidy, please fix the issues reported")
140139
}
141140
fmt.Println(">> fmt - git diff")
142141
err = sh.RunV("git", "diff")
143-
if err!= nil {
142+
if err != nil {
144143
return errors.Wrap(err, "failed running git diff, please fix the issues reported")
145144
}
146145
fmt.Println(">> fmt - git update-index")
147146
err = sh.RunV("git", "update-index", "--refresh")
148-
if err!= nil {
147+
if err != nil {
149148
return errors.Wrap(err, "failed running git update-index --refresh, please fix the issues reported")
150149
}
151150
fmt.Println(">> fmt - git diff-index")
152151
err = sh.RunV("git", "diff-index", "--exit-code", "HEAD", " --")
153-
if err!= nil {
152+
if err != nil {
154153
return errors.Wrap(err, "failed running go mod tidy, please fix the issues reported")
155154
}
156155
return nil
157156
}
158-

0 commit comments

Comments
 (0)