зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1044796 Provide an option to Loop's standalone client makefile to create a version.txt file. r=nperriault
This commit is contained in:
Родитель
760cc16155
Коммит
9d3f453c3c
|
@ -1,2 +1 @@
|
|||
.module-cache
|
||||
standalone/content/config.js
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
.module-cache
|
||||
node_modules
|
||||
*.pyc
|
||||
content/config.js
|
||||
content/VERSION.txt
|
||||
|
|
|
@ -21,6 +21,21 @@ runserver: config
|
|||
frontend:
|
||||
@echo "Not implemented yet."
|
||||
|
||||
# Try hg first, if not fall back to git.
|
||||
SOURCE_STAMP := $(shell hg parent --template '{node|short}\n' 2> /dev/null)
|
||||
ifndef SOURCE_STAMP
|
||||
SOURCE_STAMP := $(shell git describe --always --tag)
|
||||
endif
|
||||
|
||||
SOURCE_DATE := $(shell hg parent --template '{date|date}\n' 2> /dev/null)
|
||||
ifndef SOURCE_DATE
|
||||
SOURCE_DATE := $(shell git log -1 --format="%H%n%aD")
|
||||
endif
|
||||
|
||||
version:
|
||||
@echo $(SOURCE_STAMP) > content/VERSION.txt
|
||||
@echo $(SOURCE_DATE) >> content/VERSION.txt
|
||||
|
||||
config:
|
||||
@echo "var loop = loop || {};" > content/config.js
|
||||
@echo "loop.config = loop.config || {};" >> content/config.js
|
||||
|
|
Загрузка…
Ссылка в новой задаче