mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Add version.txt file to build directory on build
This commit is contained in:
parent
fafff50401
commit
82fe07ed8b
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -4,6 +4,9 @@ SASSLINT=./node_modules/.bin/sass-lint -v
|
||||||
TAP=./node_modules/.bin/tap
|
TAP=./node_modules/.bin/tap
|
||||||
WATCH=./node_modules/.bin/watch
|
WATCH=./node_modules/.bin/watch
|
||||||
WEBPACK=./node_modules/.bin/webpack
|
WEBPACK=./node_modules/.bin/webpack
|
||||||
|
GIT_VERSION=$(shell git rev-parse --verify --short=5 HEAD 2> /dev/null)
|
||||||
|
GIT_VERSION?=$(WWW_VERSION)
|
||||||
|
GIT_MESSAGE=$(shell git log -1 --pretty=%s 2> /dev/null)
|
||||||
|
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
|
|
||||||
|
@ -11,6 +14,7 @@ build:
|
||||||
@make clean
|
@make clean
|
||||||
@make translations
|
@make translations
|
||||||
@make webpack
|
@make webpack
|
||||||
|
@make version
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf ./build
|
rm -rf ./build
|
||||||
|
@ -27,12 +31,15 @@ else
|
||||||
@make build
|
@make build
|
||||||
git archive -o deploy.zip HEAD
|
git archive -o deploy.zip HEAD
|
||||||
zip -rv deploy.zip build
|
zip -rv deploy.zip build
|
||||||
eb deploy -l $$(git rev-parse --verify --short=5 HEAD) -m "$$(git log -1 --pretty=%s)"
|
eb deploy -l $(GIT_VERSION) -m "$(GIT_MESSAGE)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
translations:
|
translations:
|
||||||
./lib/bin/build-locales locales/translations.json
|
./lib/bin/build-locales locales/translations.json
|
||||||
|
|
||||||
|
version:
|
||||||
|
echo $(GIT_VERSION) > ./build/version.txt
|
||||||
|
|
||||||
webpack:
|
webpack:
|
||||||
$(WEBPACK) --bail
|
$(WEBPACK) --bail
|
||||||
|
|
||||||
|
@ -75,4 +82,4 @@ integration:
|
||||||
|
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
|
|
||||||
.PHONY: build clean deploy static translations webpack watch stop start test lint
|
.PHONY: build clean deploy static translations version webpack watch stop start test lint
|
||||||
|
|
Loading…
Reference in a new issue