Skip to content

Commit 3c3b016

Browse files
Rewrite manpages in Asciidoc (#262)
1 parent fa2753c commit 3c3b016

File tree

12 files changed

+1620
-542
lines changed

12 files changed

+1620
-542
lines changed

.circleci/config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ commands:
3636
- ~/Library/Caches/Homebrew
3737

3838
jobs:
39+
build-manpages:
40+
docker:
41+
- image: asciidoctor/docker-asciidoctor
42+
steps:
43+
- checkout
44+
- run:
45+
name: Build manpages
46+
command: make manpages
47+
- store_artifacts:
48+
path: man
49+
3950
test:
4051
docker:
4152
- image: crystallang/crystal:latest
@@ -63,6 +74,7 @@ workflows:
6374
version: 2
6475
ci:
6576
jobs:
77+
- build-manpages
6678
- test
6779
- test-on-osx
6880
- test-on-nightly

.github/workflows/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ jobs:
4242

4343
- name: Check formatting
4444
run: crystal tool format --check src spec
45+
46+
docs:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Download source
50+
uses: actions/checkout@v2
51+
- name: Build manpages
52+
uses: Analog-inc/asciidoctor-action@master
53+
with:
54+
shellcommand: "make manpages"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/spec/.shards
88
/spec/unit/.lib
99
/tmp
10+
/docs/*.html

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SOURCES = $(SHARDS_SOURCES) $(MOLINILLO_SOURCES)
1414
TEMPLATES = src/templates/*.ecr
1515

1616
SHARDS_CONFIG_BUILD_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null)
17+
SHARDS_VERSION := $(shell cat VERSION)
1718
SOURCE_DATE_EPOCH := $(shell (git show -s --format=%ct HEAD || stat -c "%Y" Makefile || stat -f "%m" Makefile) 2> /dev/null)
1819
EXPORTS := SHARDS_CONFIG_BUILD_COMMIT="$(SHARDS_CONFIG_BUILD_COMMIT)" SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
1920
DESTDIR ?=
@@ -27,14 +28,16 @@ MOLINILLO_URL = "https://github.com/crystal-lang/crystal-molinillo/archive/v$(MO
2728

2829
all: bin/shards
2930

30-
clean: phony
31+
include docs.mk
32+
33+
clean: phony clean_docs
3134
rm -f bin/shards
3235

3336
bin/shards: $(SOURCES) $(TEMPLATES) lib
3437
@mkdir -p bin
3538
$(EXPORTS) $(CRYSTAL) build $(FLAGS) src/shards.cr -o bin/shards
3639

37-
install: bin/shards phony
40+
install: bin/shards manpages phony
3841
$(INSTALL) -m 0755 -d "$(BINDIR)" "$(MANDIR)/man1" "$(MANDIR)/man5"
3942
$(INSTALL) -m 0755 bin/shards "$(BINDIR)"
4043
$(INSTALL) -m 0644 man/shards.1 "$(MANDIR)/man1"

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ These requirements are only for compiling Shards.
7575
variable (eg: `export LIBRARY_PATH="/usr/local/lib:$LIBRARY_PATH"`).
7676
Please adjust the path per your Homebrew installation.
7777

78+
* [asciidoctor](https://asciidoctor.org/)
79+
80+
Needed for building manpages.
81+
7882

7983
## License
8084

0 commit comments

Comments
 (0)