Initial import of IC.Rebuild
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
param([string]$HooksDevPath = (Join-Path $env:APPDATA 'XIVLauncher\addon\Hooks\dev'))
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$env:DOTNET_CLI_HOME = Join-Path $PSScriptRoot '.dotnet'
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1'
|
||||
Push-Location $PSScriptRoot
|
||||
try {
|
||||
dotnet restore IC.Rebuild.csproj --configfile NuGet.Config --nologo
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Plugin restore failed.' }
|
||||
dotnet build IC.Rebuild.csproj -c Release "-p:HooksDevPath=$HooksDevPath" --no-restore --nologo
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Plugin build failed.' }
|
||||
dotnet restore Tests/IC.Rebuild.Tests.csproj --configfile NuGet.Config --nologo
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Test restore failed.' }
|
||||
dotnet run --project Tests/IC.Rebuild.Tests.csproj -c Release --no-restore
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Tests failed.' }
|
||||
New-Item -ItemType Directory -Path (Join-Path $PSScriptRoot 'dist') -Force | Out-Null
|
||||
$icVersion = (Get-Content -LiteralPath 'ICRebuild.json' -Raw -Encoding UTF8 | ConvertFrom-Json).AssemblyVersion
|
||||
$icArchive = Join-Path 'dist' ("ICRebuild-{0}-dev.zip" -f $icVersion)
|
||||
Compress-Archive -LiteralPath @('bin/Release/ICRebuild.dll','bin/Release/ICRebuild.json','THIRD_PARTY_NOTICES.md') -DestinationPath $icArchive -Force
|
||||
Get-Item -LiteralPath $icArchive
|
||||
}
|
||||
finally { Pop-Location }
|
||||
Reference in New Issue
Block a user