Merge pull request #207 from rschamp/feature/make-deploy

Add `deploy` make target
This commit is contained in:
Andrew Sliwinski 2015-11-03 15:18:14 -05:00
commit b4e7eaa94e
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