reagent/Makefile

65 lines
1.1 KiB
Makefile
Raw Normal View History

2013-12-16 22:19:36 +00:00
PORT = 4562
PROF = dev
PROF = dev,test
# PROF = dev,test,srcmap
# PROF = prod,test
# PROF = prod
CLJSBUILD = client
CLJSDIRS = src test
VERSION = 0.0.4-SNAPSHOT
2013-12-16 22:19:36 +00:00
all: buildrun
run: openbrowser buildrun
leinbuild: setup
lein -o cljsbuild once $(CLJSBUILD)
openbrowser:
2013-12-17 19:10:03 +00:00
(sleep 1 && open site/test.html) &
2013-12-16 22:19:36 +00:00
buildrun: setup
lein -o with-profile $(PROF) cljsbuild auto $(CLJSBUILD)
install: leinbuild
2013-12-16 22:19:36 +00:00
lein install
preclean:
2013-12-17 18:20:20 +00:00
rm -rf repl .repl target out
2013-12-16 22:19:36 +00:00
clean: preclean
lein -o clean
setup: preclean copyjs
2013-12-16 22:19:36 +00:00
show-outdated:
lein ancient :all
veryclean: clean
rm -rf bower_components
bower_components:
2013-12-19 18:40:58 +00:00
bower install react#v0.5.2
2013-12-16 22:19:36 +00:00
src/cloact/impl/react.min.js: bower_components/react/react-with-addons.min.js
cp $< $@
2013-12-19 18:40:58 +00:00
copyjs: bower_components src/cloact/impl/react.min.js
2013-12-16 22:19:36 +00:00
setversion:
2013-12-16 22:22:54 +00:00
version=$(VERSION); \
2013-12-16 22:19:36 +00:00
find . -name project.clj | \
2013-12-16 22:22:54 +00:00
xargs -n1 sed -i "" -e 's,\(cloact "\)\([^"]*\)",\1'"$$version"'"',g
2013-12-16 22:19:36 +00:00
tag: setversion
if git rev-parse v$(VERSION) 2>/dev/null; then \
echo "Tag already exists"; \
exit 1; \
else \
git commit --allow-empty -a -m"Version "$(VERSION); \
git tag v$(VERSION); \
fi