Skip to content

Commit

Permalink
Cleanup Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
arnested committed Jun 26, 2024
1 parent 77aa9ad commit 434080f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ PLATFORM=$(shell docker version --format '{{.Server.Os}}/{{.Server.Arch}}')
DERIVATIVES=$(shell ls context)

.DEFAULT_GOAL := all
.PHONY: all build clean help _platforms test
.PHONY: all clean help test $(DERIVATIVES) $(TEST)

all: $(DERIVATIVES) ## Build Docker images for all derivatives

help: ## Display a list of the public targets
@grep -E -h "^[a-z]+:.*##" $(MAKEFILE_LIST) | sed -e 's/\(.*\):.*## *\(.*\)/\1|\2/' | column -s '|' -t

_derivates: ## Output platforms as JSON list
_derivates: ## Output derivatives as JSON list
@echo $(DERIVATIVES) | jq --compact-output --raw-input 'split(" ") | map(select(. != ""))'

_platforms: ## Output platforms as JSON list
@echo $(PLATFORMS) | jq --compact-output --raw-input 'split(",") | map(select(. != ""))'

$(DERIVATIVES): Dockerfile context ## Build Docker image for derivative
$(DERIVATIVES): ## Build Docker image for derivative
docker buildx build --target $@ --platform=$(PLATFORM) --file Dockerfile --tag ghcr.io/reload/https-proxy:$@ --load context

test: base
Expand Down

0 comments on commit 434080f

Please sign in to comment.