How to find delta file names from two tags in Azure repo

Basavaraja Ningappa Juttiyavar 1 Reputation point
2021-10-29T16:45:55.32+00:00

How to find delta file names from two tags in Azure repo

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
289 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2021-11-02T07:55:52.417+00:00

    I am trying to use the pasted code..

    Code:-

    $targetfolder = "$(Build.StagingDirectory)" + "/"

    function CopyFiles{
    param( [string]$source )

    $target = $targetfolder + $source
    
    New-Item -Force $target
    copy-item $source $target -Force
    

    }

    $changes = git diff --name-only --relative --diff-filter AMR HEAD^ HEAD .

    if ($changes -is [string]){ CopyFiles $changes }
    else
    {
    if ($changes -is [array])
    {
    foreach ($change in $changes){ CopyFiles $change }
    }
    }

    This script will it execute in Azure Repo

    0 comments No comments