Add deploy make target

Now that we send the build artifact to EB from Travis, we have to do the same thing locally.
This commit is contained in:
Ray Schamp 2015-11-03 12:51:45 -05:00
parent d7112d7a29
commit b278aa05f5
2 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View file

@ -15,3 +15,4 @@ npm-*
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
deploy.zip

View file

@ -17,6 +17,19 @@ clean:
mkdir -p build
mkdir -p locales
deploy:
ifeq ($(shell grep "artifact: deploy.zip" .elasticbeanstalk/config.yml), )
@echo "You must configure elasticbeanstalk to deploy an artifact."
@echo "Add the following to your .elasticbeanstalk/config.yml"
@echo "deploy:\n artifact: deploy.zip"
else
@make build
git archive -o deploy.zip HEAD
zip -rv deploy.zip build
eb deploy -l $$(git rev-parse --verify --short=5 HEAD) -m "$$(git log -1 --pretty=%s)"
endif
static:
cp -a ./static/. ./build/
@ -61,4 +74,4 @@ lint:
# ------------------------------------
.PHONY: build clean static translations webpack watch stop start test lint
.PHONY: build clean deploy static translations webpack watch stop start test lint