@@ -114,6 +114,43 @@ functions:
114
114
content_type : text/html
115
115
display_name : " Rendered docs"
116
116
117
+ " upload man pages" :
118
+ - command : shell.exec
119
+ params :
120
+ silent : true
121
+ working_dir : " mongoc"
122
+ script : |
123
+ . venv/bin/activate
124
+
125
+ # "man" with redirection writes plain ASCII, use lower-level groff to
126
+ # force formatted output. -t lays out tables, -T utf8 sets the output
127
+ # type, -man loads the manpage TROFF macros.
128
+ for doc in doc/man/*.3; do
129
+ echo $doc
130
+ fullpath=`pwd`/$doc
131
+ groff -man -t -T utf8 $fullpath | term2image -o $fullpath.png
132
+ done
133
+
134
+ mkdir -p man-page-images
135
+ mv doc/man/*.png man-page-images
136
+
137
+ export AWS_ACCESS_KEY_ID=${aws_key}
138
+ export AWS_SECRET_ACCESS_KEY=${aws_secret}
139
+ sudo apt-get install -y awscli
140
+ aws s3 cp man-page-images s3://mciuploads/${project}/man-page-images/${CURRENT_VERSION} --recursive --acl public-read --region us-east-1
141
+
142
+ sh .evergreen/man-page-image-list.sh man-page-images > man-page-images/index.html
143
+ - command : s3.put
144
+ params :
145
+ aws_key : ${aws_key}
146
+ aws_secret : ${aws_secret}
147
+ local_file : ${workdir}/mongoc/man-page-images/index.html
148
+ remote_file : ${project}/man-page-images/${CURRENT_VERSION}/index.html
149
+ bucket : mciuploads
150
+ permissions : public-read
151
+ content_type : text/html
152
+ display_name : " Rendered man pages"
153
+
117
154
" upload coverage" :
118
155
- command : shell.exec
119
156
params :
@@ -354,11 +391,12 @@ tasks:
354
391
params :
355
392
working_dir : " mongoc"
356
393
script : |
357
- # Need modern Sphinx for :caption: in literal includes
394
+ # Need modern Sphinx for :caption: in literal includes.
395
+ # Install term2image for man page rendering.
358
396
python -m virtualenv venv
359
397
cd venv
360
398
. bin/activate
361
- ./bin/pip install sphinx
399
+ ./bin/pip install sphinx git+https://github.com/ajdavis/term2image.git
362
400
cd ..
363
401
364
402
- command : shell.exec
@@ -379,6 +417,7 @@ tasks:
379
417
380
418
./autogen.sh --enable-html-docs --enable-man-pages && make distcheck
381
419
- func : " upload docs"
420
+ - func : " upload man pages"
382
421
- func : " upload release"
383
422
- func : " upload build"
384
423
0 commit comments