This repository has been archived by the owner on Mar 11, 2019. It is now read-only.
forked from 1602/jugglingdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (73 loc) · 2.43 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
## TESTS
TESTER = ./node_modules/.bin/mocha
OPTS = --growl
TESTS = test/*.test.js
test:
$(TESTER) $(OPTS) $(TESTS)
test-verbose:
$(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"
## DOCS
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 $< $@
docs/html/%.3.html: docs/%.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@
docs/html/index.html: docs/jugglingdb.md scripts/doc.sh docs/footer.html
scripts/doc.sh $< $@
man: $(MAN_DOCS)
html: $(HTML_DOCS)
build: man
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
TARGET = origin
FROM = $(GITBRANCH)
TO = $(GITBRANCH)
pull:
git pull $(TARGET) $(FROM)
safe-pull:
git pull $(TARGET) $(FROM) --no-commit
push: test
git push $(TARGET) $(TO)
feature:
git checkout -b feature-$(filter-out $@,$(MAKECMDGOALS))
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
.PHONY: test docs