2017-05-20 02:20:37 +03:00
|
|
|
CLI_DIR:=$(CURDIR)/components/cli
|
|
|
|
ENGINE_DIR:=$(CURDIR)/components/engine
|
|
|
|
PACKAGING_DIR:=$(CURDIR)/components/packaging
|
2017-09-30 01:17:11 +03:00
|
|
|
MOBY_COMPONENTS_SHA=ab7c118272b02d8672dc0255561d0c4015979780
|
2018-03-28 23:26:30 +03:00
|
|
|
MOBY_COMPONENTS_URL=https://raw.githubusercontent.com/docker/moby-extras/$(MOBY_COMPONENTS_SHA)/cmd/moby-components
|
2017-09-05 21:40:33 +03:00
|
|
|
MOBY_COMPONENTS=.helpers/moby-components-$(MOBY_COMPONENTS_SHA)
|
2017-05-20 09:03:35 +03:00
|
|
|
VERSION=$(shell cat VERSION)
|
2017-05-20 02:20:37 +03:00
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: help
|
2017-05-20 02:20:37 +03:00
|
|
|
help: ## show make targets
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: test-integration-cli
|
2017-05-20 02:20:37 +03:00
|
|
|
test-integration-cli: $(CLI_DIR)/build/docker ## test integration of cli and engine
|
|
|
|
$(MAKE) -C $(ENGINE_DIR) DOCKER_CLI_PATH=$< test-integration-cli
|
|
|
|
|
|
|
|
$(CLI_DIR)/build/docker:
|
|
|
|
$(MAKE) -C $(CLI_DIR) -f docker.Makefile build
|
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: deb
|
2017-05-20 02:20:37 +03:00
|
|
|
deb: ## build deb packages
|
2017-05-20 09:03:35 +03:00
|
|
|
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) deb
|
2017-05-20 02:20:37 +03:00
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: rpm
|
2017-05-20 02:20:37 +03:00
|
|
|
rpm: ## build rpm packages
|
2017-05-20 09:03:35 +03:00
|
|
|
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) rpm
|
2017-05-20 02:20:37 +03:00
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: static
|
2017-05-20 09:02:06 +03:00
|
|
|
static: ## build static packages
|
2017-05-20 09:03:35 +03:00
|
|
|
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) static
|
2017-05-20 09:06:29 +03:00
|
|
|
|
2017-09-05 21:40:33 +03:00
|
|
|
.PHONY: clean
|
2017-05-20 09:06:29 +03:00
|
|
|
clean: ## clean the build artifacts
|
|
|
|
-$(MAKE) -C $(CLI_DIR) clean
|
|
|
|
-$(MAKE) -C $(ENGINE_DIR) clean
|
|
|
|
-$(MAKE) -C $(PACKAGING_DIR) clean
|
2017-09-05 21:40:33 +03:00
|
|
|
|
|
|
|
$(MOBY_COMPONENTS):
|
|
|
|
mkdir -p .helpers
|
|
|
|
curl -fsSL $(MOBY_COMPONENTS_URL) > $(MOBY_COMPONENTS)
|
|
|
|
chmod +x $(MOBY_COMPONENTS)
|
|
|
|
|
|
|
|
.PHONY: update-components
|
2019-10-24 03:21:38 +03:00
|
|
|
update-components: update-components-cli update-components-engine update-components-packaging ## update components using moby extra tool
|
2017-09-05 21:40:33 +03:00
|
|
|
|
|
|
|
.PHONY: update-components-cli
|
|
|
|
update-components-cli: $(MOBY_COMPONENTS)
|
|
|
|
$(MOBY_COMPONENTS) update cli
|
|
|
|
|
|
|
|
.PHONY: update-components-engine
|
|
|
|
update-components-engine: $(MOBY_COMPONENTS)
|
|
|
|
$(MOBY_COMPONENTS) update engine
|
|
|
|
|
|
|
|
.PHONY: update-components-packaging
|
|
|
|
update-components-packaging: $(MOBY_COMPONENTS)
|
|
|
|
$(MOBY_COMPONENTS) update packaging
|