Makefile for creating xpis for each platforms.
The part of extracting the version number from manifest.json refered to a post [1] in Stack Overflow. [1] https://stackoverflow.com/questions/1955505/parsing-json-with-unix-tools#comment42500081_1955505
This commit is contained in:
Родитель
3f7123ec39
Коммит
9397772e41
|
@ -0,0 +1 @@
|
|||
*.xpi
|
|
@ -0,0 +1,18 @@
|
|||
ARCHS=linux linux64 mac64 win32
|
||||
MANIFEST=manifest.json
|
||||
|
||||
VERSION=`grep -Eo '"version"\:\s*"[^"]+' $(MANIFEST) | grep -Eo '[0-9].*'`
|
||||
|
||||
define build-xpis
|
||||
for arch in $(ARCHS); do \
|
||||
echo "build $$arch-$(VERSION).xpi"; \
|
||||
rm -f $$arch.xpi; \
|
||||
zip $$arch-$(VERSION).xpi -r $$arch adb.json $(MANIFEST); \
|
||||
done
|
||||
endef
|
||||
|
||||
package:
|
||||
@$(call build-xpis)
|
||||
|
||||
clean:
|
||||
rm -f *.xpi
|
Загрузка…
Ссылка в новой задаче