File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7979# # DOCKER_PLATFORM Overrides platform to build Docker images for (defaults to host platform).
8080# # GOEXPERIMENT Used to enable Go features behind feature flags.
8181# # SKIP_UI_BUILD Set to 1 to skip the UI build (assumes UI assets already exist).
82+ # # SKIP_CODE_GENERATION Set to 1 to skip code generation before building the alloy binary
8283
8384include tools/make/*.mk
8485
@@ -202,7 +203,7 @@ test-pyroscope:
202203.PHONY : binaries alloy
203204binaries : alloy
204205
205- alloy : generate-ui
206+ alloy : generate-ui generate-source-code
206207ifeq ($(USE_CONTAINER ) ,1)
207208 $(RERUN_IN_CONTAINER)
208209else
@@ -274,6 +275,18 @@ else
274275 cd ./tools/generate-module-dependencies && $(GO_ENV) go generate
275276endif
276277
278+ generate-source-code :
279+ ifeq ($(USE_CONTAINER ) ,1)
280+ $(RERUN_IN_CONTAINER)
281+ else ifeq ($(CI),true)
282+ @echo "Skipping code generation (CI=1)"
283+ else ifeq ($(SKIP_CODE_GENERATION),1)
284+ @echo "Skipping code generation (SKIP_CODE_GENERATION=1)"
285+ else
286+ @$(MAKE) generate-module-dependencies generate-otel-collector-distro
287+ endif
288+
289+
277290generate-otel-collector-distro :
278291ifeq ($(USE_CONTAINER ) ,1)
279292 $(RERUN_IN_CONTAINER)
You can’t perform that action at this time.
0 commit comments