Skip to content

Commit

Permalink
Update makefile
Browse files Browse the repository at this point in the history
- describe workflow
- add workflow
- add help to each section
  • Loading branch information
1602 committed Mar 31, 2013
1 parent 61a005b commit e8077fa
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions Makefile
Expand Up @@ -11,6 +11,12 @@ test-verbose:
testing: testing:
$(TESTER) $(OPTS) --watch $(TESTS) $(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"

## DOCS ## DOCS


MAN_DOCS = $(shell find docs -name '*.md' \ MAN_DOCS = $(shell find docs -name '*.md' \
Expand Down Expand Up @@ -39,4 +45,52 @@ build: man
web: html web: html
rsync ./docs/html/* jugglingdb.co:/var/www/apps/jugglingdb.co/public 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
FROM = $(GITBRANCH)
TO = $(GITBRANCH)

pull:
git pull origin $(FROM)

safe-pull:
git pull origin $(FROM) --no-commit

push: test
git push origin $(TO)

feature:
git checkout -b 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

.PHONY: test docs .PHONY: test docs

0 comments on commit e8077fa

Please sign in to comment.