forked from OpenTl/OpenTl.ClientApi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-docs.ps1
28 lines (20 loc) · 891 Bytes
/
build-docs.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
$zipfile = Resolve-Path $zipfile
$outpath = Resolve-Path $outpath
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}
Set-Location "docs_src"
if(!(Test-Path ".\Wyam")){
New-Item -ItemType directory -Path ".\Wyam"
Invoke-WebRequest "https://raw.githubusercontent.com/Wyamio/Wyam/master/RELEASE" -OutFile ".\Wyam\wyamversion.txt"
$version = Get-Content ".\Wyam\wyamversion.txt"
$filePath = "https://github.com/Wyamio/Wyam/releases/download/$version/Wyam-$version.zip"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $filePath -OutFile ".\Wyam\Wyam.zip"
Unzip ".\Wyam\Wyam.zip" ".\Wyam"
}
&".\Wyam\wyam.exe" "--output" "..\docs"
Set-Location ".."