Docgen only on Windows

This commit is contained in:
Ganesh Viswanathan 2018-11-02 14:14:15 -05:00
commit 34efd6619f
3 changed files with 17 additions and 16 deletions

View file

@ -7,12 +7,12 @@ dist: trusty
addons:
apt:
packages:
- python-pygments
- libssh2-1-dev
before_script:
- export RELEASE=`curl --silent https://api.github.com/repos/nim-lang/nightlies/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`
- export TXZ=`curl --silent https://api.github.com/repos/nim-lang/nightlies/releases/latest | grep '"name":' | sed -E 's/.*"([^"]+)".*/\1/' | grep linux`
- export VERSION=`echo $TXZ | cut -d"-" -f 2,2`
- gcc -v
- echo "RELEASE = $RELEASE, TXZ = $TXZ, VERSION = $VERSION"
- curl -L --silent -o $TXZ "https://github.com/nim-lang/nightlies/releases/download/$RELEASE/$TXZ"
- tar xf $TXZ

View file

@ -82,7 +82,7 @@ for:
install:
- sudo apt -qq update
- sudo apt -qq install --yes python-pygments libssh2-1-dev libgcrypt20-dev libgpg-error-dev
- sudo apt -qq install --yes libssh2-1-dev libgcrypt20-dev libgpg-error-dev
- if [ ! -e /home/appveyor/binaries ]; then
echo $NIM_VERSION &&
mkdir /home/appveyor/binaries &&

View file

@ -40,20 +40,21 @@ for comp in comps:
exec "nimble install -y"
exec "nimble test"
if dirExists("web"/comp):
rmDir("web"/comp)
when defined(windows):
if dirExists("web"/comp):
rmDir("web"/comp)
mkDir("web"/comp)
for file in listFiles(".."/comp/comp) & listFiles(".."/comp):
if file.splitFile().ext == ".nim":
cpFile(file, "web"/comp/extractFilename(file))
cpFile("web"/"nimdoc.cfg", "web"/comp/"nimdoc.cfg")
withDir("web"/comp):
for file in listFiles("."):
mkDir("web"/comp)
for file in listFiles(".."/comp/comp) & listFiles(".."/comp):
if file.splitFile().ext == ".nim":
exec "nim doc --git.url:. --index:on -o:" & file.changeFileExt("html") & " " & file
exec "pygmentize -f html -O full,linenos=1,anchorlinenos=True,lineanchors=L,style=vs -o " & file & ".html " & file
cpFile(file, "web"/comp/extractFilename(file))
exec "nim buildIndex -o:index.html ."
rmFile("web"/comp/"nimdoc.cfg")
cpFile("web"/"nimdoc.cfg", "web"/comp/"nimdoc.cfg")
withDir("web"/comp):
for file in listFiles("."):
if file.splitFile().ext == ".nim":
exec "nim doc --git.url:. --index:on -o:" & file.changeFileExt("html") & " " & file
exec "pygmentize -f html -O full,linenos=1,anchorlinenos=True,lineanchors=L,style=vs -o " & file & ".html " & file
exec "nim buildIndex -o:index.html ."
rmFile("web"/comp/"nimdoc.cfg")