Skip to content

Commit

Permalink
Final 1.3 enhancement manual in build
Browse files Browse the repository at this point in the history
  • Loading branch information
jdunkerley committed Aug 7, 2017
1 parent eaa3b53 commit cfe76d2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
Binary file modified AlteryxAbacus.dll
Binary file not shown.
28 changes: 25 additions & 3 deletions CreateRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,37 @@ $doc.Close(0)
$word.Quit([ref]0)
Remove-Item $readMeDoc

# Write-Host "Building Manual ..."
# $text = (Get-Content "$root\..\AlteryxFormulaAddOns.wiki\Function-List.md" -Raw)
Write-Host "Building Manual ..."
if (Test-Path "$root\FunctionManual.md") {
Remove-Item "$root\FunctionManual.md"
}

Get-Content "$root\..\AlteryxFormulaAddOns.wiki\Function-List.md" -Raw | Add-Content "$root\FunctionManual.md"
Get-ChildItem "$root\..\AlteryxFormulaAddOns.wiki\*.xml).md" | Get-Content -Raw | Add-Content "$root\FunctionManual.md"

$text = (Get-Content "$root\FunctionManual.md" -Raw)
$text = $text -replace "\[([^\]]+)\]\([^#]+#([^)]+)\)", '[$1](#$2)'
Set-Content "$root\FunctionManual.md" $text
& pandoc -f markdown_github -t docx FunctionManual.md -o FunctionManual.docx
Remove-Item "$root\FunctionManual.md"

Write-Host "Running Word to create pdf ..."
$readMeDoc = Join-Path $root "FunctionManual.docx"
$readMePdf = Join-Path $root "Manual.pdf"
$word = New-Object -ComObject "Word.Application"
$doc = $word.Documents.Open($readMeDoc)
$doc.ExportAsFixedFormat([string]$readMePdf, 17, 0)
$doc.Close(0)
$word.Quit([ref]0)
Remove-Item $readMeDoc

Write-Host "Removing bak files ..."
Remove-Item *.bak -Recurse

$output = "$root\AlteryxAbacus v$version.zip"
Compress-Archive -Path ("$root\*.dll", "$root\*Utils.xml", "$root\README.pdf", "$root\Install.bat", "$root\Installer.ps1", "$root\Uninstall.bat", "$root\Uninstaller.ps1") -DestinationPath $output -Verbose -Update
Compress-Archive -Path ("$root\*.dll", "$root\*Utils.xml", "$root\README.pdf", "$root\Manual.pdf", "$root\Install.bat", "$root\Installer.ps1", "$root\Uninstall.bat", "$root\Uninstaller.ps1") -DestinationPath $output -Verbose -Update
Remove-Item "$root\README.pdf"
Remove-Item "$root\Manual.pdf"

$output = "$root\AlteryxAbacus v$version Tests.zip"
Compress-Archive -Path ("$root\*.Test", "$root\*.yxm*", "*.png") -DestinationPath $output -Verbose -Update
Expand Down

0 comments on commit cfe76d2

Please sign in to comment.