Skip to content

Commit

Permalink
Makefile: Implement chrome target, and extract the version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarks-net committed Aug 26, 2017
1 parent 47f476b commit 3a6703a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
@@ -1,17 +1,21 @@
BUILDDIR := build/
NAME := ipvfoo
VERSION := $(shell cat src/manifest.json | \
sed -n 's/^ *"version": *"\([0-9.]\+\)".*/\1/p' | \
head -n1)

all: prepare firefox chrome

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}

0 comments on commit 3a6703a

Please sign in to comment.