From f554536b953f3ef3a6572adf07899a3b2a9f5533 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Thu, 27 Jan 2022 10:14:38 -0600 Subject: [PATCH] s This is a combination of 7 commits. This is the 1st commit message: --- Application/BuildScripts/PostPublish.bat | 20 +++++++++++++++++++- Application/Main.cs | 3 +++ DeploymentFiles/deployment-pipeline.yml | 13 +++++++++---- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Application/BuildScripts/PostPublish.bat b/Application/BuildScripts/PostPublish.bat index 99bcff0b5..e6c5d036f 100644 --- a/Application/BuildScripts/PostPublish.bat +++ b/Application/BuildScripts/PostPublish.bat @@ -23,6 +23,7 @@ echo setting up default folders if not exist "%PublishDir%\Configuration" md "%PublishDir%\Configuration" move "%PublishDir%\DefaultSettings.json" "%PublishDir%\Configuration\" if not exist "%PublishDir%\Lib\" md "%PublishDir%\Lib\" +del "%PublishDir%\Microsoft.CodeAnalysis*.dll" /F /Q move "%PublishDir%\*.dll" "%PublishDir%\Lib\" move "%PublishDir%\*.json" "%PublishDir%\Lib\" move "%PublishDir%\runtimes" "%PublishDir%\Lib\runtimes" @@ -30,6 +31,16 @@ move "%PublishDir%\ru" "%PublishDir%\Lib\ru" move "%PublishDir%\de" "%PublishDir%\Lib\de" move "%PublishDir%\pt" "%PublishDir%\Lib\pt" move "%PublishDir%\es" "%PublishDir%\Lib\es" +rmdir /Q /S "%PublishDir%\cs" +rmdir /Q /S "%PublishDir%\fr" +rmdir /Q /S "%PublishDir%\it" +rmdir /Q /S "%PublishDir%\ja" +rmdir /Q /S "%PublishDir%\ko" +rmdir /Q /S "%PublishDir%\pl" +rmdir /Q /S "%PublishDir%\pt-BR" +rmdir /Q /S "%PublishDir%\tr" +rmdir /Q /S "%PublishDir%\zh-Hans" +rmdir /Q /S "%PublishDir%\zh-Hant" if exist "%PublishDir%\refs" move "%PublishDir%\refs" "%PublishDir%\Lib\refs" echo making start scripts @@ -40,6 +51,13 @@ echo moving front-end library dependencies if not exist "%PublishDir%\wwwroot\font" mkdir "%PublishDir%\wwwroot\font" move "WebfrontCore\wwwroot\lib\open-iconic\font\fonts\*.*" "%PublishDir%\wwwroot\font\" if exist "%PublishDir%\wwwroot\lib" rd /s /q "%PublishDir%\wwwroot\lib" +if not exist "%PublishDir%\wwwroot\css" mkdir "%PublishDir%\wwwroot\css" +move "WebfrontCore\wwwroot\css\global.min.css" "%PublishDir%\wwwroot\css\global.min.css" +if not exist "%PublishDir%\wwwroot\js" mkdir "%PublishDir%\wwwroot\js" +move "%SourceDir%\WebfrontCore\wwwroot\js\global.min.js" "%PublishDir%\wwwroot\js\global.min.js" +if not exist "%PublishDir%\wwwroot\images" mkdir "%PublishDir%\wwwroot\images" +xcopy "%SourceDir%\WebfrontCore\wwwroot\images" "%PublishDir%\wwwroot\images" /E /H /C /I + echo setting permissions... -cacls "%PublishDir%" /t /e /p Everyone:F \ No newline at end of file +cacls "%PublishDir%" /t /e /p Everyone:F diff --git a/Application/Main.cs b/Application/Main.cs index 991f3b437..2e3acd8c5 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -331,6 +331,9 @@ namespace IW4MAdmin.Application /// private static IServiceCollection ConfigureServices(string[] args) { + // todo: this is a quick fix + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + // setup the static resources (config/master api/translations) var serviceCollection = new ServiceCollection(); var appConfigHandler = new BaseConfigurationHandler("IW4MAdminSettings"); diff --git a/DeploymentFiles/deployment-pipeline.yml b/DeploymentFiles/deployment-pipeline.yml index 6a0da791a..ac5f3ac36 100644 --- a/DeploymentFiles/deployment-pipeline.yml +++ b/DeploymentFiles/deployment-pipeline.yml @@ -71,11 +71,11 @@ steps: targetType: 'inline' script: | Write-Host 'Getting dotnet bundle' - wget http://raidmax.org/IW4MAdmin/res/dotnet-bundle.zip -o $(Build.Repository.LocalPath)\WebfrontCore\dotnet-bundle.zip + wget http://raidmax.org/IW4MAdmin/res/dotnet-bundle.zip -o $(Build.Repository.LocalPath)\dotnet-bundle.zip Write-Host 'Unzipping download' - Expand-Archive -LiteralPath $(Build.Repository.LocalPath)\WebfrontCore\dotnet-bundle.zip -DestinationPath $(Build.Repository.LocalPath)\WebfrontCore + Expand-Archive -LiteralPath $(Build.Repository.LocalPath)\dotnet-bundle.zip -DestinationPath $(Build.Repository.LocalPath) Write-Host 'Executing dotnet-bundle' - $(Build.Repository.LocalPath)\WebfrontCore\dotnet-bundle.exe $(Build.Repository.LocalPath)\WebfrontCore\bundleconfig.json + $(Build.Repository.LocalPath)\dotnet-bundle.exe $(Build.Repository.LocalPath)\WebfrontCore\bundleconfig.json failOnStderr: true workingDirectory: '$(Build.Repository.LocalPath)\WebfrontCore' @@ -104,7 +104,7 @@ steps: inputs: filename: 'Application\BuildScripts\PostPublish.bat' workingFolder: '$(Build.Repository.LocalPath)' - arguments: '$(outputFolder)' + arguments: '$(outputFolder) $(Build.Repository.LocalPath)' failOnStandardError: true - task: PowerShell@2 @@ -162,6 +162,11 @@ steps: archiveFile: '$(Build.ArtifactStagingDirectory)/IW4MAdmin-$(Build.BuildNumber).zip' replaceExistingArchive: true +- task: PublishPipelineArtifact@1 + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)/IW4MAdmin-$(Build.BuildNumber).zip' + artifact: 'IW4MAdmin-$(Build.BuildNumber).zip' + - task: FtpUpload@2 displayName: 'Upload zip file to website' inputs: