Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Updated CI
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Aug 13, 2020
1 parent 3fc8898 commit ae7c5f0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 28 deletions.
28 changes: 27 additions & 1 deletion .ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,30 @@ steps:
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
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
40 changes: 13 additions & 27 deletions scripts/xcopy-files.ps1
Original file line number Diff line number Diff line change
@@ -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
exit 0

0 comments on commit ae7c5f0

Please sign in to comment.