Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build gmi to the CI #380

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ jobs:
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install pandoc texlive-xetex texinfo
go install github.com/n0x1m/md2gmi@latest
- name: Build ebooks
run: make pdf epub info
- name: Pub
run: make pdf epub info gmi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: r2book
path: |
r2book.pdf
r2book.epub
r2book.info.gz
r2book-gmi.tar.gz

# Release creation
check_release:
Expand Down Expand Up @@ -77,3 +79,4 @@ jobs:
r2book.pdf
r2book.epub
r2book.info.gz
r2book-gmi.tar.gz
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ _book/*
*.rej
*.bak
*.log
gmi/
r2book.pdf
r2book.epub
r2book.texi
r2book.info*
r2book-gmi.tar.gz
18 changes: 8 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ info: texi
makeinfo --force --no-split r2book.texi
gzip -9n r2book.info

MD2GMI=md2gmi/md2gmi
GOPATH?=$(HOME)/go
GOBIN?=$(GOPATH)/bin
MD2GMI?=$(GOBIN)/md2gmi

md2gmi:
git clone https://github.com/n0x1m/md2gmi

$(MD2GMI): md2gmi
cd md2gmi && go build .

gmi: $(MD2GMI)
gmi:
@test -x $(MD2GMI) || (echo "ERROR: Missing md2gmi.\nTo install run: go install github.com/n0x1m/md2gmi@latest"; false)
rm -rf gmi
mkdir -p gmi
for a in $(shell find src -type d) ; do b=`echo $$a |sed -e 's,src/,gmi/,'`; mkdir -p $$b ; done
for a in $(shell find src | grep md$$) ; do b=`echo $$a |sed -e 's,src/,gmi/,' -e 's,md$$,gmi,'` ; $(MD2GMI) -o $$b < $$a; done
cp -f gmi/intro.gmi gmi/index.gmi
for a in $(shell find src -type f -name \*.md) ; do b=`echo $$a |sed -e 's,src/,gmi/,' -e 's,md$$,gmi,'` ; $(MD2GMI) -i $$a -o $$b; done
ln -v gmi/SUMMARY.gmi gmi/index.gmi
tar -czf r2book-gmi.tar.gz -C gmi .
Loading