Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (28 sloc) 1.12 KB
# Copyright (c) 2011, Yahoo! Inc. All rights reserved.
# Copyrights licensed under the BSD License. See the accompanying LICENSE.txt file for terms.
PLUGINS :=
VERSION := $(shell sed -ne '/^BOOMR\.version/{s/^.*"\([^"]*\)".*/\1/;p;q;}' boomerang.js)
DATE := $(shell date +%s)
MINIFIER := cat
all: boomerang-$(VERSION).$(DATE).js
usage:
echo "Create a release version of boomerang:"
echo " make"
echo ""
echo "Create a release version of boomerang with the dns plugin:"
echo " make PLUGINS=dns.js"
echo ""
echo "Create a yuicompressor minified release version of boomerang:"
echo " make MINIFIER=\"java -jar /path/to/yuicompressor-2.4.2.jar --type js\""
echo ""
echo "Create a jsmin minified release version of boomerang:"
echo " make MINIFIER=\"/path/to/jsmin\""
echo ""
boomerang-$(VERSION).$(DATE).js: boomerang.js $(PLUGINS)
echo
echo "Making $@ ..."
echo "using plugins: $(PLUGINS)..."
cat boomerang.js $(PLUGINS) zzz_last_plugin.js | sed -e 's/^\(BOOMR\.version = "\)$(VERSION)\("\)/\1$(VERSION).$(DATE)\2/' | $(MINIFIER) | perl -pe "s/\(window\)\);/\(window\)\);\n/g" > $@ && echo "done"
echo
.PHONY: all
.SILENT:
Jump to Line
Something went wrong with that request. Please try again.