Skip to content

Commit

Permalink
Implement help in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptak committed Feb 23, 2024
1 parent f39055d commit 8bc7274
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ else
BUILD_ARG=--build-arg=SANDBOX_IMAGE_TAG=$(TAG)
endif

.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; \
printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9\/-]+:.*?##/ \
{ printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } \
/^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)


#
# This recipe builds and pushes images for production. Note: RELEASE_TAG must be set
#
.PHONY: cloudbuild
cloudbuild: require_release_tag push_prod_images
cloudbuild: require_release_tag push_prod_images ## Build and push images

.PHONY: require_release_tag
require_release_tag:
Expand Down Expand Up @@ -64,7 +71,7 @@ build_dynamic_analysis_sandbox: DOCKERFILE=$(SANDBOX_DIR)/dynamicanalysis/Docker
build_dynamic_analysis_sandbox: IMAGE_NAME=dynamic-analysis

.PHONY: build_prod_images
build_prod_images: build_dynamic_analysis_sandbox build_static_analysis_sandbox build_analysis_image build_scheduler_image
build_prod_images: build_dynamic_analysis_sandbox build_static_analysis_sandbox build_analysis_image build_scheduler_image ## Build images

#
# Builds then pushes analysis and sandbox images
Expand All @@ -89,7 +96,7 @@ push_static_analysis_sandbox: build_static_analysis_sandbox
push_prod_sandboxes: push_dynamic_analysis_sandbox push_static_analysis_sandbox

.PHONY: push_prod_images
push_prod_images: push_prod_sandboxes push_analysis_image push_scheduler_image
push_prod_images: push_prod_sandboxes push_analysis_image push_scheduler_image ## Push production images


#
Expand Down

0 comments on commit 8bc7274

Please sign in to comment.