chore: Using Windows, add exe extension to tools (#11608)
This commit is contained in:
parent
f001c99184
commit
fa811ed983
|
|
@ -4,8 +4,8 @@
|
|||
/telegraf.exe
|
||||
/telegraf.gz
|
||||
/tools/package_lxd_test/package_lxd_test
|
||||
/tools/license_checker/license_checker
|
||||
/tools/readme_config_includer/generator
|
||||
/tools/license_checker/license_checker*
|
||||
/tools/readme_config_includer/generator*
|
||||
/vendor
|
||||
.DS_Store
|
||||
process.yml
|
||||
|
|
|
|||
15
Makefile
15
Makefile
|
|
@ -1,11 +1,10 @@
|
|||
ifeq ($(OS),Windows_NT)
|
||||
next_version := $(shell type build_version.txt)
|
||||
tag := $(shell git describe --exact-match --tags 2> nul)
|
||||
else
|
||||
next_version := $(shell cat build_version.txt)
|
||||
tag := $(shell git describe --exact-match --tags 2>/dev/null)
|
||||
ifneq (,$(filter $(OS),Windows_NT Windows))
|
||||
EXEEXT=.exe
|
||||
endif
|
||||
|
||||
next_version := $(shell cat build_version.txt)
|
||||
tag := $(shell git describe --exact-match --tags 2>/dev/null)
|
||||
|
||||
branch := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
commit := $(shell git rev-parse --short=8 HEAD)
|
||||
glibc_version := 2.17
|
||||
|
|
@ -115,8 +114,8 @@ versioninfo:
|
|||
go generate cmd/telegraf/telegraf_windows.go; \
|
||||
|
||||
build_tools:
|
||||
$(HOSTGO) build -o ./tools/license_checker/license_checker ./tools/license_checker
|
||||
$(HOSTGO) build -o ./tools/readme_config_includer/generator ./tools/readme_config_includer/generator.go
|
||||
$(HOSTGO) build -o ./tools/license_checker/license_checker$(EXEEXT) ./tools/license_checker
|
||||
$(HOSTGO) build -o ./tools/readme_config_includer/generator$(EXEEXT) ./tools/readme_config_includer/generator.go
|
||||
|
||||
embed_readme_%:
|
||||
go generate -run="readme_config_includer/generator$$" ./plugins/$*/...
|
||||
|
|
|
|||
|
|
@ -73,6 +73,9 @@ sudo yum install telegraf
|
|||
|
||||
Telegraf requires Go version 1.18 or newer, the Makefile requires GNU make.
|
||||
|
||||
On Windows, the makefile requires the use of a bash terminal to support all makefile targets.
|
||||
An easy option to get bash for windows is using the version that comes with [git for windows](https://gitforwindows.org/).
|
||||
|
||||
1. [Install Go](https://golang.org/doc/install) >=1.18 (1.18.0 recommended)
|
||||
2. Clone the Telegraf repository:
|
||||
|
||||
|
|
@ -80,11 +83,11 @@ Telegraf requires Go version 1.18 or newer, the Makefile requires GNU make.
|
|||
git clone https://github.com/influxdata/telegraf.git
|
||||
```
|
||||
|
||||
3. Run `make` from the source directory
|
||||
3. Run `make build` from the source directory
|
||||
|
||||
```shell
|
||||
cd telegraf
|
||||
make
|
||||
make build
|
||||
```
|
||||
|
||||
### Nightly Builds
|
||||
|
|
|
|||
Loading…
Reference in New Issue