forked from greghendershott/rackjure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
48 lines (39 loc) · 959 Bytes
/
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
PACKAGENAME=rackjure
COLLECTS=rackjure
SCRBL=rackjure/rackjure.scrbl
all: setup
clean:
find . -name compiled -type d | xargs rm -rf
rm -rf htmldocs
setup:
raco setup --tidy $(COLLECTS)
link:
raco pkg install --link -n $(PACKAGENAME) $$(pwd)
unlink:
raco pkg remove $(PACKAGENAME)
test:
raco test -x .
htmldocs: $(SCRBL)
raco scribble \
--html \
--dest htmldocs \
--dest-name index \
++main-xref-in \
--redirect-main http://docs.racket-lang.org/ \
\
$(SCRBL)
pages:
@(git branch -v | grep -q gh-pages || (echo local gh-pages branch missing; false))
@echo
@git branch -av | grep gh-pages
@echo
@(echo 'Is the branch up to date? Press enter to continue.'; read dummy)
git clone -b gh-pages . pages
publish: htmldocs pages
rm -rf pages/*
cp -r htmldocs/. pages/.
(cd pages; git add -A)
-(cd pages; git commit -m "Update $$(date +%Y%m%d%H%M%S)")
(cd pages; git push origin gh-pages)
rm -rf pages
git push origin gh-pages