mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Merge pull request #207 from rschamp/feature/make-deploy
Add `deploy` make target
This commit is contained in:
commit
b4e7eaa94e
2 changed files with 15 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,3 +15,4 @@ npm-*
|
|||
.elasticbeanstalk/*
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
||||
deploy.zip
|
||||
|
|
15
Makefile
15
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue