-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
64 lines (49 loc) · 1.68 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
# By default 'bump' does nothing.
VERSION?=$(shell cat VERSION)
test/shunt.sh:
cd test && curl -L https://raw.githubusercontent.com/odb/shunt/latest/install.sh | bash -s latest local
test: test/shunt.sh .PHONY
# Check 'source' for supported shells
$(shell which bash) -c 'source ./shml.sh && color-bar'
$(shell which zsh) -c 'source ./shml.sh && color-bar'
# Execute test suite
./test/shunt.sh --verbose ./test/*_tests.sh
test/%: .PHONY
./test/shunt.sh --verbose $@
clean:
-rm test/shunt.sh
BRANCH=master
docs-build:
cd docs/ && jekyll build
docs-serve:
cd docs/ && jekyll serve
docs-deploy:
@git status | grep "working directory clean" || (echo "ERROR: You have uncommitted changes!"; git status; exit 1)
-git branch -D gh-pages
git checkout -b gh-pages $(BRANCH)
git rm -rf CHANGELOG.md CONTRIBUTING.md LICENSE Makefile README.md shml.sh test/ .travis.yml
@for dir in $$(find docs -type d); do \
mkdir -v -p $$(echo $$dir | sed 's/docs\///'); \
done
@for file in $$(find docs -type f); do \
git mv --force -v $$file $$(echo $$file | sed 's/docs\///') || exit 1; \
done
git add .
git commit -m "Deploying Docs to gh-pages."
git push origin gh-pages --force
git checkout $(BRANCH)
# Usage: make bump VERSION=<new_version>
bump:
# Updating $(shell cat VERSION) to $(VERSION)
find . -type f | grep -v ".git\|CHANGELOG" | xargs grep -l $(shell cat VERSION) | xargs sed -i '' -e "s/$(shell cat VERSION)/$(VERSION)/g"
publish: publish/npm
publish/npm:
npm publish
# support a single make command from brew
install:
install -m 0755 shml.sh /usr/local/bin
install -T -m 0755 shml.sh /usr/local/bin/shml
remove:
rm -f /usr/local/bin/shml.sh /usr/local/bin/shml
.PHONY:
# vim: ft=make: