Skip to content

Commit

Permalink
improve root Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Apr 13, 2024
1 parent 7abec6c commit b69a6d7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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%)

0 comments on commit b69a6d7

Please sign in to comment.