diff --git a/Makefile b/Makefile index 1391acf..4167660 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,22 @@ -gemfiles = $(shell find . -name Gemfile -maxdepth 5 | sort) -lockfiles = $(foreach gemfile,$(gemfiles),$(gemfile).lock) +GEMFILES ?= $(shell find . -name Gemfile -maxdepth 5 | sort) +LOCKFILES ?= $(foreach GEMFILE,$(GEMFILES),$(GEMFILE).lock) -.PHONY: build clean logs +.PHONY: blue build clean global logs -build: $(lockfiles) +blue: + terraform -chdir=$@ apply + +build: $(LOCKFILES) clean: find . -type d -name vendor | xargs rm -rf -$(lockfiles): %.lock: % .ruby-version - BUNDLE_APP_CONFIG=$(PWD)/.bundle bundle install --gemfile $< +global: + terraform -chdir=$@ apply logs: aws logs tail --follow $(shell aws logs describe-log-groups | jq -r '.logGroups[].logGroupName' | grep brutalismbot | fzf --no-info --reverse --sync --height 10%) + +$(LOCKFILES): %.lock: % .ruby-version + BUNDLE_APP_CONFIG=$(PWD)/.bundle BUNDLE_GEMFILE=$< bundle update + BUNDLE_APP_CONFIG=$(PWD)/.bundle BUNDLE_GEMFILE=$< bundle install