Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Oct 5, 2024
1 parent 01c6f95 commit 827c14b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 827c14b

Please sign in to comment.