From ae7c5f0edb0891cd51e9fd4e243067dee0b5d360 Mon Sep 17 00:00:00 2001 From: erri120 Date: Thu, 13 Aug 2020 19:31:20 +0200 Subject: [PATCH] Updated CI --- .ci/azure-pipelines.yml | 28 +++++++++++++++++++++++++++- scripts/xcopy-files.ps1 | 40 +++++++++++++--------------------------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 14bfe72..45571ad 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -33,4 +33,30 @@ steps: - task: VSTest@2 inputs: platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' \ No newline at end of file + configuration: '$(buildConfiguration)' + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: | + $A = "DLSiteMetadata", "ExtensionUpdater","F95ZoneMetadata","JastusaMetadata","VNDBMetadata", "ExtensionUpdater" + + $configuration = "$(buildConfiguration)" + $output = "$(Build.ArtifactStagingDirectory)" + + foreach($element in $A) { + $currentPath = "$(Build.SourcesDirectory)" + $inputPath = $currentPath+"\"+$element+"\bin\"+$configuration + xcopy.exe $inputPath\*.dll $output\$element\ /Y /c + xcopy.exe $inputPath\*.pdb $output\$element\ /Y /c + xcopy.exe $inputPath\extension.yaml $output\$element\ /Y /c + xcopy.exe $inputPath\icon.png $output\$element\ /Y /c + } + + exit 0 + errorActionPreference: 'continue' + +- task: PublishBuildArtifacts@1 + inputs: + pathToPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: drop \ No newline at end of file diff --git a/scripts/xcopy-files.ps1 b/scripts/xcopy-files.ps1 index 6c516e5..d587aed 100644 --- a/scripts/xcopy-files.ps1 +++ b/scripts/xcopy-files.ps1 @@ -1,29 +1,15 @@ -#Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process - -#eg: .\xcopy-files.ps1 "M:\Projects\Playnite.Extensions\DLSiteMetadata\bin\Debug" "M:\Games\Playnite\Extensions\DLSiteMetadata" - -$argsCount = $args.Count -if($args.Count -lt 2 -or $args.Count -gt 3){ - Write-Error "Script got called with $argsCount arguments, required: 3" - exit +$A = "DLSiteMetadata", "ExtensionUpdater","F95ZoneMetadata","JastusaMetadata","VNDBMetadata", "ExtensionUpdater" + +$configuration = "$(buildConfiguration)" +$output = "$(Build.ArtifactStagingDirectory)" + +foreach($element in $A) { + $currentPath = "$(Build.SourcesDirectory)" + $inputPath = $currentPath+"\"+$element+"\bin\"+$configuration + xcopy.exe $inputPath\*.dll $output\$element\ /Y /c + xcopy.exe $inputPath\*.pdb $output\$element\ /Y /c + xcopy.exe $inputPath\extension.yaml $output\$element\ /Y /c + xcopy.exe $inputPath\icon.png $output\$element\ /Y /c } -if($args.Count -eq 3){ - $debug = $args[2] - if($debug -ne "debug") { - Write-Error "Unknown second argument: $debug. If you want to enable debug output use debug" - exit - } - $DebugPreference = "Continue" - Write-Debug "Debug output enabled" -} - -$inputFolder = $args[0] -$outputFolder = $args[1] -Write-Debug "Input: $inputFolder" -Write-Debug "Output: $outputFolder" - -xcopy.exe $inputFolder\*.dll $outputFolder /Y -xcopy.exe $inputFolder\*.pdb $outputFolder /Y -xcopy.exe $inputFolder\extension.yaml $outputFolder /Y -xcopy.exe $inputFolder\icon.png $outputFolder /Y \ No newline at end of file +exit 0 \ No newline at end of file