Skip to content

Commit

Permalink
Add generation & upload of source index
Browse files Browse the repository at this point in the history
  • Loading branch information
terrajobst committed May 29, 2019
1 parent 95b8364 commit 34aa9f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
30 changes: 30 additions & 0 deletions azure-pipelines-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

# Configured on Azure
# pool:
# vmImage: 'Hosted Windows 2019 with VS2019'

variables:
buildConfiguration: 'Release'
sln: './src/minsk.sln'

steps:
- script: dotnet build --configuration $(buildConfiguration) $(sln)
displayName: 'dotnet build $(buildConfiguration)'
- task: PowerShell@2
inputs:
filePath: 'genindex.ps1'
- task: FtpUpload@2
inputs:
credentialsOption: 'serviceEndpoint'
serverEndpoint: 'FTP Minsk Index'
rootDirectory: 'bin\index\index'
filePatterns: '**'
remoteDirectory: '/site/wwwroot/index'
clean: false
cleanContents: true
preservePaths: true
trustSSL: true
11 changes: 11 additions & 0 deletions genindex.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$indexDir = "bin\index"
$toolsDir = "bin\indexTools"
$zipFile = "$toolsDir\indexTools.zip"
$url = "https://github.com/KirillOsenkov/SourceBrowser/releases/download/v1.0.21/HtmlGenerator.zip"
$toolExe = "$toolsDir\HtmlGenerator\HtmlGenerator.exe"
$sln = "src\minsk.sln"

mkdir $toolsDir | out-null
wget $url -outFile $zipFile | out-null
Expand-Archive $zipFile $toolsDir | out-null
& $toolExe $sln /out:$indexDir

0 comments on commit 34aa9f5

Please sign in to comment.