loopback-datasource-juggler/Makefile

99 lines
2.4 KiB
Makefile
Raw Normal View History

2013-03-24 21:22:23 +00:00
## TESTS
2011-11-05 10:54:52 +00:00
2013-03-24 21:22:23 +00:00
TESTER = ./node_modules/.bin/mocha
2013-04-06 10:57:12 +00:00
OPTS = --growl
2013-03-24 21:22:23 +00:00
TESTS = test/*.test.js
2011-11-05 10:54:52 +00:00
2013-03-24 21:22:23 +00:00
test:
$(TESTER) $(OPTS) $(TESTS)
test-verbose:
2013-03-24 21:22:23 +00:00
$(TESTER) $(OPTS) --reporter spec $(TESTS)
testing:
$(TESTER) $(OPTS) --watch $(TESTS)
about-testing:
@echo "\n## TESTING\n"
@echo " make test # Run all tests in silent mode"
@echo " make test-verbose # Run all tests in verbose mode"
@echo " make testing # Run tests continuously"
2013-03-24 21:22:23 +00:00
## DOCS
2013-03-23 18:50:01 +00:00
MAN_DOCS = $(shell find docs -name '*.md' \
|sed 's|.md|.3|g' \
|sed 's|docs/|docs/man/|g' )
HTML_DOCS = $(shell find docs -name '*.md' \
|sed 's|.md|.3.html|g' \
|sed 's|docs/|docs/html/|g' ) \
docs/html/index.html
docs/man/%.3: docs/%.md scripts/doc.sh
scripts/doc.sh $< $@
2013-03-26 00:40:16 +00:00
docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html
2013-03-23 18:50:01 +00:00
scripts/doc.sh $< $@
2013-03-26 19:34:01 +00:00
docs/html/index.html: docs/jugglingdb.md scripts/doc.sh docs/footer.html
2013-03-23 18:50:01 +00:00
scripts/doc.sh $< $@
man: $(MAN_DOCS)
html: $(HTML_DOCS)
2013-03-25 11:42:39 +00:00
build: man
2013-03-23 18:50:01 +00:00
web: html
rsync ./docs/html/* jugglingdb.co:/var/www/apps/jugglingdb.co/public
about-docs:
@echo "\n## DOCS\n"
@echo " make man # Create docs for man"
@echo " make html # Create docs in html"
@echo " make web # Publish docs to jugglingdb.co"
## WORKFLOW
GITBRANCH = $(shell git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
REPO = marcusgreenwood/hatchjs
2013-03-31 12:35:26 +00:00
TARGET = origin
FROM = $(GITBRANCH)
TO = $(GITBRANCH)
pull:
2013-03-31 12:35:26 +00:00
git pull $(TARGET) $(FROM)
safe-pull:
2013-03-31 12:35:26 +00:00
git pull $(TARGET) $(FROM) --no-commit
push: test
2013-03-31 12:35:26 +00:00
git push $(TARGET) $(TO)
feature:
git checkout -b feature-$(filter-out $@,$(MAKECMDGOALS))
2013-03-31 12:35:26 +00:00
git push -u $(TARGET) feature-$(filter-out $@,$(MAKECMDGOALS))
%:
@:
version-build:
@echo "Increasing version build, publishing package, then push, hit Ctrl+C to skip before 'three'"
@sleep 1 && echo 'one...'
@sleep 1 && echo 'two...'
@sleep 1 && echo 'three!'
@sleep 1
npm version build && npm publish && git push
about-workflow:
@echo "\n## WORKFLOW\n"
@echo " make pull # Pull changes from current branch"
@echo " make push # Push changes to current branch"
@echo " make feature {name} # Create feature branch 'feature-name'"
@echo " make pr # Make pull request"
@echo " make version-build # Create new build version"
## HELP
help: about-testing about-docs about-workflow
2013-03-23 18:50:01 +00:00
.PHONY: test docs