aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-20 14:40:19 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-20 14:40:19 +0200
commit3a238f27b660d2fec8e274907aad4a8e3bc24e57 (patch)
treeee00a1e0fb53fbcde341a9267442d21073eec87a
parentb919b385f5b7d3e2f41855d742c1e818ae95bd02 (diff)
Add version number to resulting pdf filename
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rwxr-xr-xgendocs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/gendocs.sh b/gendocs.sh
index 56d4907..637ef1d 100755
--- a/gendocs.sh
+++ b/gendocs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-OUTFILENAME="xds-UsersGuide"
+OUTFILENAME="XDS_UsersGuide"
SCRIPT=$(basename $BASH_SOURCE)
@@ -63,7 +63,8 @@ if [ "$DO_ACTION" = "pdf" -o "$DO_ACTION" = "serve" ]; then
# Update cover when book.json has been changed
[[ $ROOTDIR/book.json -nt $ROOTDIR/docs/cover.jpg ]] && { echo "Update cover files"; $ROOTDIR/docs/resources/make_cover.sh || exit 1; }
- OUTFILE=$OUT_DIR/$OUTFILENAME.pdf
+ VERSION="_v$(grep '"version":' $ROOTDIR/book.json | cut -d'"' -f 4)"
+ OUTFILE=$OUT_DIR/$OUTFILENAME$VERSION.pdf
$DRY $GITBOOK pdf $ROOTDIR $OUTFILE $DEBUG_FLAG
[ "$?" = "0" ] && echo "PDF has been successfully generated in $OUTFILE"
else