forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (92 loc) · 3.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.PHONY: help
.DEFAULT_GOAL := help
_latest_version := $(shell scripts/version.sh true)
_version := $(shell scripts/version.sh)
export USE_CONTAINER ?= docker
help:
@echo " __ __ __"
@echo " \ \ / / / /"
@echo " \ V / / / "
@echo " \_/ \/ "
@echo ""
@echo " V E C T O R"
@echo ""
@echo "---------------------------------------------------------------------------------------"
@echo ""
@awk 'BEGIN {FS = ":.*##"; printf "Usage: make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Development
bench: ## Run internal benchmarks
@cargo bench --all
build: ## Build the project
@cargo build --no-default-features --features="$${FEATURES:-default}"
check: check-code check-fmt check-generate check-examples
check-code: ## Checks code for compilation errors (only default features)
@scripts/run.sh checker cargo check --all --all-targets
check-fmt: ## Checks code formatting correctness
@scripts/run.sh checker scripts/check-style.sh
@scripts/run.sh checker cargo fmt -- --check
check-generate: ## Checks for pending `make generate` changes
@scripts/run.sh checker scripts/check-generate.sh
check-examples: ## Validates the config examples
@cargo run -q -- validate --topology --deny-warnings ./config/examples/*.toml
check-version: ## Checks that the version in Cargo.toml is up-to-date
@scripts/run.sh checker scripts/check-version.rb
check-blog: ## Checks that all blog articles are signed by their authors
@scripts/run.sh checker scripts/check-blog-signatures.rb
export CHECK_URLS ?= true
generate: ## Generates files across the repo using the data in /.meta
@scripts/run.sh checker scripts/generate.rb
fmt: ## Format code
@scripts/check-style.sh --fix
@cargo fmt
release: ## Release a new Vector version
@$(MAKE) release-meta
@$(MAKE) generate CHECK_URLS=false
@$(MAKE) release-commit
release-push: ## Push new Vector version
@scripts/release-push.sh
run: ## Starts Vector in development mode
@cargo run
signoff: ## Signsoff all previous commits since branch creation
@scripts/signoff.sh
sign-blog: ## Sign newly added blog articles using GPG
@scripts/sign-blog.sh
test: ## Spins up Docker resources and runs _every_ test
@docker-compose up -d test-runtime-deps
@cargo test --all --features docker -- --test-threads 4
test-behavior: ## Runs behavioral tests
@cargo run -- test tests/behavior/**/*.toml
clean: ## Remove build artifacts
@cargo clean
##@ Releasing
build-archive: ## Build a Vector archive for a given $TARGET and $VERSION
scripts/build-archive.sh
build-ci-docker-images: ## Build the various Docker images used for CI
@scripts/build-ci-docker-images.sh
build-docker: ## Build the Vector docker images, but do not push
@scripts/build-docker.sh
package-deb: ## Create a .deb package from artifacts created via `build`
@scripts/package-deb.sh
package-rpm: ## Create a .rpm package from artifacts created via `build`
@scripts/package-rpm.sh
release-commit: ## Commits release changes
@scripts/release-commit.rb
release-docker: ## Release to Docker Hub
@scripts/release-docker.sh
release-github: ## Release to Github
@bundle install --gemfile=scripts/Gemfile --quiet
@scripts/release-github.rb
release-homebrew: ## Release to timberio Homebrew tap
@scripts/release-homebrew.sh
release-meta: ## Prepares the release metadata
@bundle install --gemfile=scripts/Gemfile --quiet
@scripts/release-meta.rb
release-rollback:
@bundle install --gemfile=scripts/Gemfile --quiet
@scripts/release-rollback.rb
release-s3: ## Release artifacts to S3
@scripts/release-s3.sh
sync-install:
@aws s3 cp distribution/install.sh s3://sh.vector.dev --sse --acl public-read
version: ## Get the current Vector version
@echo $(_version)