Skip to content

Commit

Permalink
Added some tools to help with a deployment.
Browse files Browse the repository at this point in the history
* Makefile: Added.
* bin/get-chromacs-version.bash: Extracts version information from
manifest.json.
  • Loading branch information
philjackson committed Dec 12, 2009
1 parent 304c56c commit 093bd34
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 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
11 changes: 11 additions & 0 deletions 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.