Skip to content

Commit b27eebd

Browse files
authored
Fix go-licenser go.mod changes (#33)
* run go-licenser binary Running `go run ...go-licenser` was updating the `go.mod` file too. This was creating issues with the `go mod tidy` check in the CI. Running the binary directly solve this issue, but require the binary to be installed. * ci: run go-licenser from binary * update README * fix * fix2
1 parent 9fa0ea7 commit b27eebd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pull-request.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ jobs:
8585
with:
8686
go-version: "${{steps.version.outputs.go}}"
8787

88-
- name: install go-licenser
89-
run: "go get github.com/elastic/go-licenser"
90-
9188
- name: check license
9289
# -d returns files without proper header
93-
run: "go run github.com/elastic/go-licenser -license Elasticv2 -d"
90+
run: |
91+
GOBIN=$PWD/bin go install github.com/elastic/go-licenser@latest
92+
./bin/go-licenser -license Elasticv2 -d

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build:
1111
go build -ldflags "$(VERSION_LDFLAGS)" -o elastic-agent-changelog-tool
1212

1313
licenser:
14-
go run github.com/elastic/go-licenser -license Elasticv2
14+
go-licenser -license Elasticv2
1515

1616
test:
1717
go test -v ./...

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Tooling to manage the changelog for beats, Elastic Agent and Fleet Server
44
## Requirements
55

66
`git` CLI should be installed and available.
7+
[`go-licenser`](https://github.com/elastic/go-licenser) CLI should be installed and available.

0 commit comments

Comments
 (0)