Skip to content

Commit

Permalink
Add SKIP_COMPILE Makefile var
Browse files Browse the repository at this point in the history
  • Loading branch information
jchengsfx committed Apr 12, 2021
1 parent c536cac commit 4f96900
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ BUILD_X3=-X $(BUILD_INFO_IMPORT_PATH).BuildType=$(BUILD_TYPE)
BUILD_INFO=-ldflags "${BUILD_X1} ${BUILD_X2} ${BUILD_X3}"

SMART_AGENT_RELEASE=v5.9.1
SKIP_COMPILE=false

### FUNCTIONS

Expand Down Expand Up @@ -189,7 +190,9 @@ delete-tag:

.PHONY: docker-otelcol
docker-otelcol:
ifneq ($(SKIP_COMPILE), true)
GOOS=linux $(MAKE) otelcol
endif
cp ./bin/otelcol_linux_amd64 ./cmd/otelcol/otelcol
docker build -t otelcol --build-arg SMART_AGENT_RELEASE=$(SMART_AGENT_RELEASE) ./cmd/otelcol/
rm ./cmd/otelcol/otelcol
Expand All @@ -216,6 +219,8 @@ binaries-windows_amd64:
.PHONY: deb-rpm-package
%-package: ARCH ?= amd64
%-package:
ifneq ($(SKIP_COMPILE), true)
$(MAKE) binaries-linux_$(ARCH)
endif
docker build -t otelcol-fpm internal/buildscripts/packaging/fpm
docker run --rm -v $(CURDIR):/repo -e PACKAGE=$* -e VERSION=$(VERSION) -e ARCH=$(ARCH) -e SMART_AGENT_RELEASE=$(SMART_AGENT_RELEASE) otelcol-fpm

0 comments on commit 4f96900

Please sign in to comment.