-
Notifications
You must be signed in to change notification settings - Fork 1
/
Generate-Assets-Package.ps1
42 lines (36 loc) · 1.44 KB
/
Generate-Assets-Package.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<#
.SYNOPSIS
Evergine ARR Assets Packages generator script, (c) 2022 Evergine
.DESCRIPTION
This script generates Assets packages for the Azure Remote Rendering for Evergine
It's meant to have the same behavior when executed locally as when it's executed in a CI pipeline.
.EXAMPLE
<script> -version 2022.2.11.1-local
.LINK
https://evergine.com/
#>
param (
[Parameter(mandatory=$true)][string]$version,
[string]$outputFolderBase = "wepkgs",
[string]$buildVerbosity = "normal",
[string]$buildConfiguration = "Release",
[string]$assetsCsprojPath = "src\Evergine.AzureRemoteRendering.Assets\Evergine.AzureRemoteRendering.Assets.csproj"
)
# Utility functions
function LogDebug($line)
{ Write-Host "##[debug] $line" -Foreground Blue -Background Black
}
# Show variables
LogDebug "############## VARIABLES ##############"
LogDebug "Version.............: $version"
LogDebug "Build configuration.: $buildConfiguration"
LogDebug "Build verbosity.....: $buildVerbosity"
LogDebug "Output folder.......: $outputFolderBase"
LogDebug "#######################################"
# Create output folder
New-Item -ItemType Directory -Force -Path $outputFolderBase
$absoluteOutputFolder = Resolve-Path $outputFolderBase
# Generate packages
LogDebug "START assets packaging process"
& dotnet build "$assetsCsprojPath" -v:$buildVerbosity -p:Configuration=$buildConfiguration -t:CreateEvergineAddOn -p:Version=$version -o "$absoluteOutputFolder"
LogDebug "END assets packaging process"