forked from dm-academy/dcp-pub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender-commit.sh
More file actions
executable file
·43 lines (32 loc) · 1.43 KB
/
render-commit.sh
File metadata and controls
executable file
·43 lines (32 loc) · 1.43 KB
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
#!/bin/bash
# don't go running this thing without a thorough understanding.
# (well, it probably wouldn't hurt you, but it'll certainly blow up all over the place.)
# MUST be run from aitm dir
# this builds the book as html and pdf, and pushes to the working and pages repos in one command.
# pdf currently disabled.
# yes this is really tightly coupled to my workstations.
# (but runs well from both a Linux and a Mac Air, I
# switch between them at least once a day)
# I am using my "adoc" toolchain (stolen from Pro Git) as a basis.
# https://github.com/CharlesTBetz/adoc
# two peer repos @ same level, one "aitm" and one "aitm-pages"
# making this collaborative will need some help.
# commit source
git add . -A && git commit -m "commit"
git push origin master
#build html
bundle exec rake book:build
mv aitm-student.html index.html # hack, I should figure out the CLI parm for the rake command
# copy html & images to github pages
# dependent on successfully changing directories along relative paths. heaven help the person who runs this other than from the aitm dir.
cp -R images ../aitm-pages/
cp *.html ../aitm-pages/
cd ../aitm-pages # ugly & brittle.
git pull # pull down previous html. never gets edited by hand.
git add . -A && git commit -m "commit"
git push origin gh-pages
cd ../aitm
# build pdf
# a2x --verbose -fpdf -dbook --fop --icons --icons-dir=$HOME/opt/asciidoc/images/icons aitm.adoc
#!/bin/bash
#cp *.pdf ../aitm-pages/