From b69a6d747c901b81584ac81bf9adc86e344840bc Mon Sep 17 00:00:00 2001 From: Alexander Mancevice Date: Sat, 13 Apr 2024 14:35:03 -0400 Subject: [PATCH] improve root Makefile --- Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d8758fd..1391acf 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ -PROJECTS = $(shell find * -maxdepth 0 -type d) +gemfiles = $(shell find . -name Gemfile -maxdepth 5 | sort) +lockfiles = $(foreach gemfile,$(gemfiles),$(gemfile).lock) -logs: - aws logs tail --follow $(shell aws logs describe-log-groups | jq -r '.logGroups[].logGroupName' | grep brutalismbot | fzf --no-info --reverse --sync --height 10%) +.PHONY: build clean logs + +build: $(lockfiles) -$(PROJECTS): - make -C $@ apply +clean: + find . -type d -name vendor | xargs rm -rf -.PHONY: logs $(PROJECTS) +$(lockfiles): %.lock: % .ruby-version + BUNDLE_APP_CONFIG=$(PWD)/.bundle bundle install --gemfile $< + +logs: + aws logs tail --follow $(shell aws logs describe-log-groups | jq -r '.logGroups[].logGroupName' | grep brutalismbot | fzf --no-info --reverse --sync --height 10%)