Permalink
Browse files

Added some tools to help with a deployment.

* Makefile: Added.
* bin/get-chromacs-version.bash: Extracts version information from
manifest.json.
  • Loading branch information...
1 parent 304c56c commit 093bd34af19d205faba61a711cd0b3eeadbc9fd7 @philjackson philjackson committed Dec 12, 2009
Showing with 31 additions and 0 deletions.
  1. +20 −0 Makefile
  2. +11 −0 bin/get-chromacs-version.bash
View
20 Makefile
@@ -0,0 +1,20 @@
+VERSION=$(shell bin/get-chromacs-version.bash)
+NAME=builds/chromacs-$(VERSION).crx
+
+all: $(NAME)
+
+$(NAME): manifest.json chromacs.js
+ crxmake --pack-extension-key=${HOME}/etc/chromacs.pem \
+ --extension-output=$(NAME) \
+ --pack-extension=. \
+ --ignore-dir="(bin|builds)" \
+ --ignore-file=Makefile
+
+clean:
+ rm -f $(NAME)
+
+tag:
+ git tag "$(VERSION)"
+
+# build-name: chromacs.crx
+# cp chromacs.crx builds/chromacs-$(VERSION).crx
View
11 bin/get-chromacs-version.bash
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+# extract the version from the manifest file
+
+if [ ! -f "manifest.json" ]; then
+ echo "No manifest file in this directory." >&2
+ exit 1
+fi
+
+grep '"version"' manifest.json \
+ | perl -nle '/:\s*"(.+)"/ and print $1'

0 comments on commit 093bd34

Please sign in to comment.