Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (39 sloc) 1.39 KB
#!/usr/bin/env pwsh
$root = $PSScriptRoot;
$onAppVeyor = $("$($env:APPVEYOR)" -eq "True");
Push-Location $root
" * Generating version number"
$gitVersion = (gitversion | ConvertFrom-Json)
If ($onAppVeyor) {
Write-host " - Updating appveyor build version to: $newVersion"
appveyor UpdateBuild -Version "$newVersion"
# Create output and log dirs if they don't exist (don't know why this is necessary - works on my box...)
If (!(Test-Path $CODEDROP)) {
$null = mkdir $CODEDROP;
If (!(Test-Path $LOGDIR)) {
$null = mkdir $LOGDIR;
" * Building and packaging"
msbuild /t:"Build" /p:DropFolder=$CODEDROP /p:Version="$($gitVersion.FullSemVer)" /p:NoPackageAnalysis=true /nologo /v:q /fl /flp:"LogFile=$LOGDIR/msbuild.log;Verbosity=n" /p:Configuration=Build /p:Platform="Any CPU"
# AppVeyor runs the test automagically, no need to run explicitly with nunit-console.exe.
# But we want to run the tests on localhost too.
If (! $onAppVeyor) {
"`n * Running unit tests`n"
# Find test projects
$testProjects = $(dir -r -i *.tests.csproj)
$testProjects | % {
Push-Location $_.Directory
dotnet test
You can’t perform that action at this time.