Docgen only on Windows
This commit is contained in:
parent
715b502274
commit
34efd6619f
3 changed files with 17 additions and 16 deletions
|
|
@ -7,12 +7,12 @@ dist: trusty
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- python-pygments
|
|
||||||
- libssh2-1-dev
|
- libssh2-1-dev
|
||||||
before_script:
|
before_script:
|
||||||
- export RELEASE=`curl --silent https://api.github.com/repos/nim-lang/nightlies/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`
|
- 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 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`
|
- export VERSION=`echo $TXZ | cut -d"-" -f 2,2`
|
||||||
|
- gcc -v
|
||||||
- echo "RELEASE = $RELEASE, TXZ = $TXZ, VERSION = $VERSION"
|
- echo "RELEASE = $RELEASE, TXZ = $TXZ, VERSION = $VERSION"
|
||||||
- curl -L --silent -o $TXZ "https://github.com/nim-lang/nightlies/releases/download/$RELEASE/$TXZ"
|
- curl -L --silent -o $TXZ "https://github.com/nim-lang/nightlies/releases/download/$RELEASE/$TXZ"
|
||||||
- tar xf $TXZ
|
- tar xf $TXZ
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ for:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo apt -qq update
|
- 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
|
- if [ ! -e /home/appveyor/binaries ]; then
|
||||||
echo $NIM_VERSION &&
|
echo $NIM_VERSION &&
|
||||||
mkdir /home/appveyor/binaries &&
|
mkdir /home/appveyor/binaries &&
|
||||||
|
|
|
||||||
|
|
@ -40,20 +40,21 @@ for comp in comps:
|
||||||
exec "nimble install -y"
|
exec "nimble install -y"
|
||||||
exec "nimble test"
|
exec "nimble test"
|
||||||
|
|
||||||
if dirExists("web"/comp):
|
when defined(windows):
|
||||||
rmDir("web"/comp)
|
if dirExists("web"/comp):
|
||||||
|
rmDir("web"/comp)
|
||||||
|
|
||||||
mkDir("web"/comp)
|
mkDir("web"/comp)
|
||||||
for file in listFiles(".."/comp/comp) & listFiles(".."/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("."):
|
|
||||||
if file.splitFile().ext == ".nim":
|
if file.splitFile().ext == ".nim":
|
||||||
exec "nim doc --git.url:. --index:on -o:" & file.changeFileExt("html") & " " & file
|
cpFile(file, "web"/comp/extractFilename(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 ."
|
cpFile("web"/"nimdoc.cfg", "web"/comp/"nimdoc.cfg")
|
||||||
rmFile("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")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue