Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
blipson89 committed Aug 29, 2021
1 parent 650d61c commit 8497d11
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Build/PackageNuGet.ps1
@@ -1,4 +1,7 @@
param($scriptRoot)
param(
[string]$scriptRoot,
[string]$Mode = "Release"
)

$ErrorActionPreference = "Stop"

Expand Down Expand Up @@ -26,23 +29,25 @@ $msBuild = Resolve-MsBuild
$nuGet = "$scriptRoot..\Dependencies\NuGet.exe"
$solution = "$scriptRoot\..\Synthesis.sln"

dotnet-gitversion /updateassemblyinfo Source/SharedAssemblyInfo.cs

& $nuGet restore $solution
& $msBuild $solution /p:Configuration=Release /t:Rebuild /m
& $msBuild $solution /p:Configuration=$Mode /t:Rebuild /m

$synthesisAssembly = Get-Item "$scriptRoot\..\Source\Synthesis\bin\Release\*\Synthesis.dll" | Select-Object -ExpandProperty VersionInfo
$synthesisAssembly = Get-Item "$scriptRoot\..\Source\Synthesis\bin\$Mode\*\Synthesis.dll" | Select-Object -ExpandProperty VersionInfo

$targetAssemblyVersion = $synthesisAssembly.ProductVersion

& $nuGet pack "$scriptRoot\Synthesis.nuget\Synthesis.nuspec" -version $targetAssemblyVersion -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\..\Source\Synthesis\Synthesis.csproj" -Symbols -Prop Configuration=Release -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"
& $nuGet pack "$scriptRoot\..\Source\Synthesis\Synthesis.csproj" -Symbols -Prop Configuration=$Mode -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\..\Source\Synthesis.Testing\Synthesis.Testing.csproj" -Symbols -Prop Configuration=Release -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"
& $nuGet pack "$scriptRoot\..\Source\Synthesis.Testing\Synthesis.Testing.csproj" -Symbols -Prop Configuration=$Mode -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\Synthesis.Mvc.nuget\Synthesis.Mvc.nuspec" -version $targetAssemblyVersion -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\..\Source\Synthesis.Mvc\Synthesis.Mvc.csproj" -Symbols -Prop Configuration=Release -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"
& $nuGet pack "$scriptRoot\..\Source\Synthesis.Mvc\Synthesis.Mvc.csproj" -Symbols -Prop Configuration=$Mode -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\Synthesis.Solr.nuget\Synthesis.Solr.nuspec" -version $targetAssemblyVersion -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"

& $nuGet pack "$scriptRoot\..\Source\Synthesis.Solr\Synthesis.Solr.csproj" -Symbols -Prop Configuration=Release -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"
& $nuGet pack "$scriptRoot\..\Source\Synthesis.Solr\Synthesis.Solr.csproj" -Symbols -Prop Configuration=$Mode -OutputDirectory "$scriptRoot\Versions\$targetAssemblyVersion"
12 changes: 12 additions & 0 deletions GitVersion.yml
@@ -0,0 +1,12 @@
mode: ContinuousDeployment
assembly-file-versioning-scheme: MajorMinorPatchTag
increment: none
branches:
master:
regex: ^main$
increment: patch
feature:
increment: minor
ignore:
sha: []
merge-message-formats: {}

0 comments on commit 8497d11

Please sign in to comment.