Issue with creating new Beat

Hi,

i've followed the following documentation https://www.elastic.co/guide/en/beats/devguide/7.11/new-beat.html
for creating new beat. While i'm trying to build it i got the below issues.
What i'm i doing wrong ? how can i fix it?
thanks!!

>> build: Building newbeat
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: template: inline:1:128: executing "inline" at <commit>: error calling commit: running "git rev-parse HEAD" failed with exit code 128
failed to expand template '-s -X github.com/elastic/beats/v7/libbeat/version.buildTime={{ date }} -X github.com/elastic/beats/v7/libbeat/version.commit={{ commit }}'
github.com/elastic/beats/v7/dev-tools/mage.expandTemplate
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:100
github.com/elastic/beats/v7/dev-tools/mage.Expand
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:56
github.com/elastic/beats/v7/dev-tools/mage.MustExpand
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:62
github.com/elastic/beats/v7/dev-tools/mage.Build
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/build.go:139
github.com/elastic/beats/v7/dev-tools/mage/target/build.Build
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/target/build/build.go:26
main.Build
	/usr/local/go/src/github.com/user/newbeat/magefile.go:82
main.main.func14
	/usr/local/go/src/github.com/user/newbeat/mage_output_file.go:511
main.main.func12.1
	/usr/local/go/src/github.com/user/newbeat/mage_output_file.go:276
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.