This commit is contained in:
FlightControl
2018-10-20 12:42:00 +02:00
commit b20fa48c68
921 changed files with 997850 additions and 0 deletions
+101
View File
@@ -0,0 +1,101 @@
version: 2.4.a.{build}
shallow_clone: false
skip_branch_with_pr: false
skip_commits:
message: /!nobuild/
skip_tags: false
environment:
access_token_documentation:
secure: JVBVVL8uJUcLXN+48eRdELEeCGOGCCaMzCqutsUqNuaZ/KblG5ZTt7+LV4UKv/0f
LUAROCKS_VER: 2.4.1
LUA_VER: 5.1.5
LUA: lua5.3
matrix:
- LUA_VER: 5.1.5
platform:
- x64
init:
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
# Outcomment if lua environment invalidates and needs to be reinstalled, otherwise all will run from the cache.
- call choco install -y 7zip.commandline
- call choco install -y lua51
- call choco install -y luarocks
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
- cmd: PATH = %PATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\bin
- cmd: set LUA_PATH = %LUA_PATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\share\lua\5.1\?.lua;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\share\lua\5.1\?\init.lua
- cmd: set LUA_CPATH = %LUA_CPATH%;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\lib\lua\5.1\?.dll
- call luarocks install luafilesystem 1.6.3-2
# - call luarocks install markdown 0.32-2
- call luarocks install metalua-compiler 0.7.3-1
- call luarocks install metalua-parser 0.7.3-2
- call luarocks install penlight 0.9.8-1
- call luarocks install checks
cache:
- C:\ProgramData\chocolatey\lib
- C:\ProgramData\chocolatey\bin
build_script:
- ps: |
git checkout "$env:appveyor_repo_branch" 2>&1
git clone -q --depth=1 -b "$env:appveyor_repo_branch" https://github.com/FlightControl-Master/MOOSE.git c:\Projects\Moose
git clone -q --depth=1 -b "W3" https://github.com/FlightControl-User/luadocumentor.git c:\Projects\luadocumentor
$env:LUA_PATH = "c:\Projects\luadocumentor\?.lua;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\share\lua\5.1\?.lua;C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\share\lua\5.1\?\init.lua"
$env:LUA_CPATH = "C:\ProgramData\chocolatey\lib\luarocks\luarocks-2.4.4-win32\systree\lib\lua\5.1\?.dll"
dir c:\Projects
dir
echo "Removing old Documentation"
del Documentation\*
echo "Documenting"
lua5.1 c:\Projects\luadocumentor\luadocumentor.lua -d ./Documentation "c:/Projects/Moose/Moose Development/Moose"
echo "Updating Files"
cd .\Documentation
foreach( $file in Get-ChildItem . -Filter *.html )
{
( Get-Content $file ).replace( '<head>', '<head><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=UA-97385487-1"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag(''js'', new Date());gtag(''config'', ''UA-97385487-1'');</script>' ) | Set-Content $file
}
cd ..
echo "Commit to GITHUB"
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token_documentation):x-oauth-basic@github.com`n"
git config --global user.email "sven.van.de.velde@telenet.be"
git config --global user.name "FlightControl-User"
git add ./Documentation 2>&1
git commit -m "MOOSE generated documentation [skip ci]" 2>&1
git push origin "$env:appveyor_repo_branch" 2>&1
dir
- ps: |
if( $env:appveyor_repo_branch -eq 'develop' )
{
$apiUrl = 'https://ci.appveyor.com/api'
$token = 'qts80b5kpq0ooj4x6vvw'
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$RequestBody = @{ accountName = 'FlightControl-Master'; projectSlug = 'moose-docs-develop'; branch = 'master'; environmentVariables = @{} } | ConvertTo-Json
# get project with last build details
$project = Invoke-RestMethod -method Post -Uri "$apiUrl/builds" -Headers $headers -Body $RequestBody
}
artifacts:
# - path: 'Documentation\**\*'
# name: Documentation
on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))