aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2018-11-02 14:14:15 -0500
committerGanesh Viswanathan <dev@genotrance.com>2018-11-02 14:14:15 -0500
commit34efd6619ffdb4d52047d13ca05000a75941f605 (patch)
tree113a825577bc72815dfebe608c7b4f59ba91b7a1
parent715b502274da13adb810891d7a493e4ee73ba8dc (diff)
downloadnimgen-34efd6619ffdb4d52047d13ca05000a75941f605.tar.gz
nimgen-34efd6619ffdb4d52047d13ca05000a75941f605.zip
Docgen only on Windows
-rw-r--r--.travis.yml2
-rw-r--r--appveyor.yml2
-rw-r--r--tests/nimgentest.nims29
3 files changed, 17 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml
index 340e9a3..9e2b6dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
diff --git a/appveyor.yml b/appveyor.yml
index a4d7c74..ff7f260 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -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 &&
diff --git a/tests/nimgentest.nims b/tests/nimgentest.nims
index 134e94b..f3ab526 100644
--- a/tests/nimgentest.nims
+++ b/tests/nimgentest.nims
@@ -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))
+
+ 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")
+ exec "nim buildIndex -o:index.html ."
+ rmFile("web"/comp/"nimdoc.cfg")