diff --git a/Makefile b/Makefile index 9474d14..9ce39f8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ BUILDDIR := build/ NAME := ipvfoo +VERSION := $(shell cat src/manifest.json | \ + sed -n 's/^ *"version": *"\([0-9.]\+\)".*/\1/p' | \ + head -n1) all: prepare firefox chrome @@ -7,11 +10,12 @@ prepare: mkdir -p build firefox: prepare - rm -f ${BUILDDIR}${NAME}.xpi - cd src && zip -9r ../${BUILDDIR}${NAME}.xpi * + rm -f ${BUILDDIR}${NAME}-${VERSION}.xpi + cd src && zip -9r ../${BUILDDIR}${NAME}-${VERSION}.xpi * chrome: - echo "Chrome build not implemented, package manually" + rm -f ${BUILDDIR}${NAME}-${VERSION}.zip + zip -9r ${BUILDDIR}${NAME}-${VERSION}.zip src clean: rm -rf ${BUILDDIR}