Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HANDLERS = Hello \
my.LogAggregator \
my.CountDaily \
my.CountHourly \
supecial.LogCollector
BRANCH=$(shell git rev-parse --abbrev-ref @)
JAR=$(BRANCH)/myproject-assembly-0.1.jar
all:
@cat Makefile
echo $(GETS)
CREATES=$(HANDLERS:%=create/myproject.lambda.%)
$(CREATES): create
$(MAKE) -f lambda.mk create-function handler=$(@:create/%=%) S3Key=$(S3Key)
touch $@
create-all: $(CREATES)
UPDATES=$(HANDLERS:%=update/myproject.lambda.%)
$(UPDATES):
$(MAKE) -f lambda.mk update-function-code handler=$(@:update/%=%) S3Key=$(S3Key)
update-all: $(UPDATES)
GETS=$(HANDLERS:%=get/myproject.lambda.%)
$(GETS):
$(MAKE) -f lambda.mk get-function handler=$(@:get/%=%)
get-all: $(GETS)
clean:
rm -rf create/*
RETOUCHS=$(HANDLERS:%=retouch/myproject.lambda.%)
$(RETOUCHS): create
($(MAKE) -f lambda.mk get-function handler=$(@:retouch/%=%) \
&& touch create/$(@:retouch/%=%)) || \
echo "$(@:retouch/%=%) is not exists."
retouch-all: clean $(RETOUCHS)
create:
mkdir -p $@
API_KEY=
install:
curl -fsSL "https://mackerel.io/file/script/amznlinux/setup-yum.sh" | sh
yum install -y mackerel-agent
mackerel-agent init -apikey="$(API_KEY)"
start:
/sbin/service mackerel-agent start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.