From e7163eb8852076b38209141205fffa7fbc65abaa Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Thu, 1 Aug 2024 12:04:50 -0700 Subject: [PATCH 1/8] more compatibility with expanding/contracting packages. add ability for packages to have DependentPackages that must be included in the set of packages that should be built given a changeset --- .../templates/steps/detect-api-changes.yml | 2 - .../templates/steps/verify-changelogs.yml | 17 +++++++ .../templates/steps/verify-readmes.yml | 46 +++++++++++++++++++ eng/common/scripts/Detect-Api-Changes.ps1 | 30 +++++++----- eng/common/scripts/Generate-PR-Diff.ps1 | 4 +- eng/common/scripts/Package-Properties.ps1 | 24 ++++++++-- eng/common/scripts/Verify-ChangeLogs.ps1 | 32 +++++++++++++ 7 files changed, 135 insertions(+), 20 deletions(-) create mode 100644 eng/common/pipelines/templates/steps/verify-changelogs.yml create mode 100644 eng/common/pipelines/templates/steps/verify-readmes.yml create mode 100644 eng/common/scripts/Verify-ChangeLogs.ps1 diff --git a/eng/common/pipelines/templates/steps/detect-api-changes.yml b/eng/common/pipelines/templates/steps/detect-api-changes.yml index f39a88eaa3a5..8d605d8694b1 100644 --- a/eng/common/pipelines/templates/steps/detect-api-changes.yml +++ b/eng/common/pipelines/templates/steps/detect-api-changes.yml @@ -1,6 +1,5 @@ parameters: ArtifactPath: $(Build.ArtifactStagingDirectory) - Artifacts: [] ArtifactName: 'packages' steps: @@ -14,7 +13,6 @@ steps: inputs: filePath: $(Build.SourcesDirectory)/eng/common/scripts/Detect-Api-Changes.ps1 arguments: > - -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) -ArtifactPath ${{parameters.ArtifactPath}} -CommitSha '$(Build.SourceVersion)' -BuildId $(Build.BuildId) diff --git a/eng/common/pipelines/templates/steps/verify-changelogs.yml b/eng/common/pipelines/templates/steps/verify-changelogs.yml new file mode 100644 index 000000000000..38a6cc354d28 --- /dev/null +++ b/eng/common/pipelines/templates/steps/verify-changelogs.yml @@ -0,0 +1,17 @@ +parameters: +- name: PackagePropertiesFolder + type: string +- name: Condition + type: string + default: succeeded() + +steps: + - task: Powershell@2 + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1 + arguments: > + -PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}' + pwsh: true + displayName: Verify ChangeLogEntries + condition: ${{ parameters.Condition }} + continueOnError: false diff --git a/eng/common/pipelines/templates/steps/verify-readmes.yml b/eng/common/pipelines/templates/steps/verify-readmes.yml new file mode 100644 index 000000000000..0e288ce1d1be --- /dev/null +++ b/eng/common/pipelines/templates/steps/verify-readmes.yml @@ -0,0 +1,46 @@ +parameters: +- name: PackagePropertiesFolder + type: string +- name: RepoRoot + type: string + default: $(Build.SourcesDirectory) +- name: SettingsPath + type: string + default: '$(Build.SourcesDirectory)/eng/.docsettings.yml' +- name: DocWardenVersion + type: string + default: '' +- name: Condition + type: string + default: succeeded() + +steps: +- pwsh: | + $packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}" ` + | Where-Object { $_.Extension -eq '.json' } ` + + $paths = @() + + foreach($propertiesFile in $packageProperties) { + $PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json + + $paths += (Join-Path "$(Build.SourcesDirectory)" $PackageProp.DirectoryPath) + } + + $scanPaths = $paths -join "," + Write-Host "##vso[task.setvariable variable=ScanPathArgument;]$scanPaths" + displayName: Populate Scan Paths + +- task: PowerShell@2 + displayName: "Verify Readmes" + condition: ${{ parameters.Condition }} + # todo: fix this continueOnError + continueOnError: true + inputs: + filePath: "eng/common/scripts/Verify-Readme.ps1" + arguments: > + -DocWardenVersion '${{ parameters.DocWardenVersion }}' + -ScanPaths '$(ScanPathArgument)' + -RepoRoot ${{ parameters.RepoRoot }} + -SettingsPath ${{ parameters.SettingsPath }} + pwsh: true \ No newline at end of file diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 522346502332..e0c269b13ec1 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -10,8 +10,6 @@ Param ( [string] $BuildId, [Parameter(Mandatory=$True)] [string] $CommitSha, - [Parameter(Mandatory=$True)] - [array] $ArtifactList, [string] $APIViewUri, [string] $RepoFullName = "", [string] $ArtifactName = "packages", @@ -21,6 +19,8 @@ Param ( . (Join-Path $PSScriptRoot common.ps1) +$configFileDir = Join-Path -Path $ArtifactPath "PackageInfo" + # Submit API review request and return status whether current revision is approved or pending or failed to create review function Submit-Request($filePath, $packageName) { @@ -64,7 +64,6 @@ function Submit-Request($filePath, $packageName) function Should-Process-Package($pkgPath, $packageName) { $pkg = Split-Path -Leaf $pkgPath - $configFileDir = Join-Path -Path $ArtifactPath "PackageInfo" $pkgPropPath = Join-Path -Path $configFileDir "$packageName.json" if (!(Test-Path $pkgPropPath)) { @@ -103,32 +102,39 @@ if (!($FindArtifactForApiReviewFn -and (Test-Path "Function:$FindArtifactForApiR } $responses = @{} -foreach ($artifact in $ArtifactList) + +$packageProperties = Get-ChildItem -Recurse -Force "$configFileDir" ` + | Where-Object { $_.Extension -eq '.json' } + +foreach ($packagePropFile in $packageProperties) { - Write-Host "Processing $($artifact.name)" - $packages = &$FindArtifactForApiReviewFn $ArtifactPath $artifact.name + $packageMetadata = Get-Content $packagePropFile | ConvertFrom-Json + Write-Host "Processing $($packageMetadata.Name)" + + $packages = &$FindArtifactForApiReviewFn $ArtifactPath $packageMetadata.Name + if ($packages) { $pkgPath = $packages.Values[0] - $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $artifact.name - Write-Host "Is API change detect required for $($artifact.name):$($isRequired)" + $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.Name) + Write-Host "Is API change detect required for $($packages.Name):$($isRequired)" if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/") - $respCode = Submit-Request -filePath $filePath -packageName $artifact.name + $respCode = Submit-Request -filePath $filePath -packageName $($packageMetadata.Name) if ($respCode -ne '200') { - $responses[$artifact.name] = $respCode + $responses[$($packageMetadata.Name)] = $respCode } } else { - Write-Host "Pull request does not have any change for $($artifact.name). Skipping API change detect." + Write-Host "Pull request does not have any change for $($packageMetadata.Name)). Skipping API change detect." } } else { - Write-Host "No package is found in artifact path to find API changes for $($artifact.name)" + Write-Host "No package is found in artifact path to find API changes for $($packageMetadata.Name)" } } diff --git a/eng/common/scripts/Generate-PR-Diff.ps1 b/eng/common/scripts/Generate-PR-Diff.ps1 index d84f9e15ca7c..7a31456b36ca 100644 --- a/eng/common/scripts/Generate-PR-Diff.ps1 +++ b/eng/common/scripts/Generate-PR-Diff.ps1 @@ -19,14 +19,14 @@ Param ( [string] $TargetPath ) -. (Join-Path $PSScriptRoot "Helpers" git-helpers.ps1) +. (Join-Path $PSScriptRoot "Helpers" "git-helpers.ps1") function Get-ChangedServices { Param ( [Parameter(Mandatory=$True)] [string[]] $ChangedFiles ) - + $changedServices = $ChangedFiles | Foreach-Object { if ($_ -match "sdk/([^/]+)") { $matches[1] } } | Sort-Object -Unique return $changedServices diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 0e703a9d4374..2250b4f80ba6 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -15,6 +15,7 @@ class PackageProps [boolean]$IsNewSdk [string]$ArtifactName [string]$ReleaseStatus + [string[]]$DependentPackages PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) { @@ -55,7 +56,7 @@ class PackageProps if ($changeLogEntry -and $changeLogEntry.ReleaseStatus) { $this.ReleaseStatus = $changeLogEntry.ReleaseStatus.Trim().Trim("()") - } + } } else { @@ -101,7 +102,7 @@ function Get-PkgProperties return $pkgProps[0] } - LogError "Failed to retrive Properties for [$PackageName]" + LogError "Failed to retrieve Properties for [$PackageName]" return $null } @@ -112,20 +113,35 @@ function Get-PrPkgProperties([string]$InputDiffJson) { $diff = Get-Content $InputDiffJson | ConvertFrom-Json $targetedFiles = $diff.ChangedFiles - foreach($pkg in $allPackageProperties) + $dependentPackagesForInclusion = @() + $lookup = @{} + + foreach ($pkg in $allPackageProperties) { $pkgDirectory = Resolve-Path "$($pkg.DirectoryPath)" + $lookupKey = ($pkg.DirectoryPath).Replace($RepoRoot, "").SubString(1) + $lookup[$lookupKey] = $pkg - foreach($file in $targetedFiles) + foreach ($file in $targetedFiles) { $filePath = Resolve-Path (Join-Path $RepoRoot $file) $shouldInclude = $filePath -like "$pkgDirectory*" if ($shouldInclude) { $packagesWithChanges += $pkg + + if ($pkg.DependentPackages) { + $dependentPackagesForInclusion += $pkg.DependentPackages + } } } } + foreach ($addition in $dependentPackagesForInclusion) { + if ($lookup[$addition]) { + $packagesWithChanges += $lookup[$addition] + } + } + return $packagesWithChanges } diff --git a/eng/common/scripts/Verify-ChangeLogs.ps1 b/eng/common/scripts/Verify-ChangeLogs.ps1 new file mode 100644 index 000000000000..537a5fc98599 --- /dev/null +++ b/eng/common/scripts/Verify-ChangeLogs.ps1 @@ -0,0 +1,32 @@ +# Wrapper Script for ChangeLog Verification in a PR +[CmdletBinding()] +param ( + [String]$PackagePropertiesFolder +) +Set-StrictMode -Version 3 + +. (Join-Path $PSScriptRoot common.ps1) + +# find which packages we need to confirm the changelog for +$packageProperties = Get-ChildItem -Recurse -Force "$PackagePropertiesFolder" ` + | Where-Object { $_.Extension -eq '.json' } + +# grab the json file, then confirm the changelog entry for it +$allPassing = $true +foreach($propertiesFile in $packageProperties) { + $PackageProp = Get-Content -Path $propertiesFile | ConvertFrom-Json + + $validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $false + + if (-not $validChangeLog) { + $allPassing = $false + } +} + + +if (!$allPassing) +{ + exit 1 +} + +exit 0 \ No newline at end of file From 7236a26493bc6db7fe85f445212b8f9d8c8a46ab Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:09:52 -0700 Subject: [PATCH 2/8] Apply suggestions from code review Co-authored-by: Wes Haggard --- eng/common/pipelines/templates/steps/verify-readmes.yml | 3 +-- eng/common/scripts/Detect-Api-Changes.ps1 | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-readmes.yml b/eng/common/pipelines/templates/steps/verify-readmes.yml index 0e288ce1d1be..3409441ceca1 100644 --- a/eng/common/pipelines/templates/steps/verify-readmes.yml +++ b/eng/common/pipelines/templates/steps/verify-readmes.yml @@ -16,8 +16,7 @@ parameters: steps: - pwsh: | - $packageProperties = Get-ChildItem -Recurse -Force "${{ parameters.PackagePropertiesFolder }}" ` - | Where-Object { $_.Extension -eq '.json' } ` + $packageProperties = Get-ChildItem -Recurse "${{ parameters.PackagePropertiesFolder }}" *.json $paths = @() diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index e0c269b13ec1..69320bbec5a0 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -103,8 +103,7 @@ if (!($FindArtifactForApiReviewFn -and (Test-Path "Function:$FindArtifactForApiR $responses = @{} -$packageProperties = Get-ChildItem -Recurse -Force "$configFileDir" ` - | Where-Object { $_.Extension -eq '.json' } +$packageProperties = Get-ChildItem -Recurse "$configFileDir" *.json foreach ($packagePropFile in $packageProperties) { @@ -117,7 +116,7 @@ foreach ($packagePropFile in $packageProperties) { $pkgPath = $packages.Values[0] $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.Name) - Write-Host "Is API change detect required for $($packages.Name):$($isRequired)" + Write-Host "Is API change detect required for $($packageMetadata.Name):$($isRequired)" if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/") From 908f20ad3e52f84a20b957f0b413b7224496fb1a Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:49:32 -0700 Subject: [PATCH 3/8] Update eng/common/scripts/Verify-ChangeLogs.ps1 Co-authored-by: Wes Haggard --- eng/common/scripts/Verify-ChangeLogs.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/common/scripts/Verify-ChangeLogs.ps1 b/eng/common/scripts/Verify-ChangeLogs.ps1 index 537a5fc98599..36a17c28522c 100644 --- a/eng/common/scripts/Verify-ChangeLogs.ps1 +++ b/eng/common/scripts/Verify-ChangeLogs.ps1 @@ -8,8 +8,7 @@ Set-StrictMode -Version 3 . (Join-Path $PSScriptRoot common.ps1) # find which packages we need to confirm the changelog for -$packageProperties = Get-ChildItem -Recurse -Force "$PackagePropertiesFolder" ` - | Where-Object { $_.Extension -eq '.json' } +$packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json # grab the json file, then confirm the changelog entry for it $allPassing = $true From 0df288d04c68acd732f3b02b12bee39573505306 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Thu, 1 Aug 2024 15:50:48 -0700 Subject: [PATCH 4/8] address pr feedback, now need to ensure that a service build is expandable/contractable --- eng/common/pipelines/templates/steps/verify-changelogs.yml | 1 - eng/common/pipelines/templates/steps/verify-readmes.yml | 4 +--- eng/common/scripts/Verify-ChangeLogs.ps1 | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-changelogs.yml b/eng/common/pipelines/templates/steps/verify-changelogs.yml index 38a6cc354d28..3f36954f4cd8 100644 --- a/eng/common/pipelines/templates/steps/verify-changelogs.yml +++ b/eng/common/pipelines/templates/steps/verify-changelogs.yml @@ -14,4 +14,3 @@ steps: pwsh: true displayName: Verify ChangeLogEntries condition: ${{ parameters.Condition }} - continueOnError: false diff --git a/eng/common/pipelines/templates/steps/verify-readmes.yml b/eng/common/pipelines/templates/steps/verify-readmes.yml index 3409441ceca1..13ff963b4377 100644 --- a/eng/common/pipelines/templates/steps/verify-readmes.yml +++ b/eng/common/pipelines/templates/steps/verify-readmes.yml @@ -33,8 +33,6 @@ steps: - task: PowerShell@2 displayName: "Verify Readmes" condition: ${{ parameters.Condition }} - # todo: fix this continueOnError - continueOnError: true inputs: filePath: "eng/common/scripts/Verify-Readme.ps1" arguments: > @@ -42,4 +40,4 @@ steps: -ScanPaths '$(ScanPathArgument)' -RepoRoot ${{ parameters.RepoRoot }} -SettingsPath ${{ parameters.SettingsPath }} - pwsh: true \ No newline at end of file + pwsh: true diff --git a/eng/common/scripts/Verify-ChangeLogs.ps1 b/eng/common/scripts/Verify-ChangeLogs.ps1 index 36a17c28522c..fbf117d5b9a5 100644 --- a/eng/common/scripts/Verify-ChangeLogs.ps1 +++ b/eng/common/scripts/Verify-ChangeLogs.ps1 @@ -28,4 +28,4 @@ if (!$allPassing) exit 1 } -exit 0 \ No newline at end of file +exit 0 From 1ff6b926777371cf24c18391f5bba3699e3aee0a Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Tue, 6 Aug 2024 16:27:05 -0700 Subject: [PATCH 5/8] amend to handle JS properly --- eng/common/scripts/Detect-Api-Changes.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 69320bbec5a0..8e2a84e7d12a 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -115,7 +115,7 @@ foreach ($packagePropFile in $packageProperties) if ($packages) { $pkgPath = $packages.Values[0] - $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.Name) + $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.ArtifactName) Write-Host "Is API change detect required for $($packageMetadata.Name):$($isRequired)" if ($isRequired -eq $True) { From d5ca0993b2c38476795c1dd8946c46bfb8cf53be Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Tue, 6 Aug 2024 16:28:49 -0700 Subject: [PATCH 6/8] actually handle the rename properly --- eng/common/scripts/Detect-Api-Changes.ps1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 8e2a84e7d12a..d590ce462406 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -103,12 +103,13 @@ if (!($FindArtifactForApiReviewFn -and (Test-Path "Function:$FindArtifactForApiR $responses = @{} -$packageProperties = Get-ChildItem -Recurse "$configFileDir" *.json +$packageProperties = Get-ChildItem -Recurse -Force "$configFileDir" ` + | Where-Object { $_.Extension -eq '.json' } foreach ($packagePropFile in $packageProperties) { $packageMetadata = Get-Content $packagePropFile | ConvertFrom-Json - Write-Host "Processing $($packageMetadata.Name)" + Write-Host "Processing $($packageMetadata.ArtifactName)" $packages = &$FindArtifactForApiReviewFn $ArtifactPath $packageMetadata.Name @@ -116,24 +117,24 @@ foreach ($packagePropFile in $packageProperties) { $pkgPath = $packages.Values[0] $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.ArtifactName) - Write-Host "Is API change detect required for $($packageMetadata.Name):$($isRequired)" + Write-Host "Is API change detect required for $($packages.Name):$($isRequired)" if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/") - $respCode = Submit-Request -filePath $filePath -packageName $($packageMetadata.Name) + $respCode = Submit-Request -filePath $filePath -packageName $($packageMetadata.ArtifactName) if ($respCode -ne '200') { - $responses[$($packageMetadata.Name)] = $respCode + $responses[$($packageMetadata.ArtifactName)] = $respCode } } else { - Write-Host "Pull request does not have any change for $($packageMetadata.Name)). Skipping API change detect." + Write-Host "Pull request does not have any change for $($packageMetadata.ArtifactName)). Skipping API change detect." } } else { - Write-Host "No package is found in artifact path to find API changes for $($packageMetadata.Name)" + Write-Host "No package is found in artifact path to find API changes for $($packageMetadata.ArtifactName)" } } From b41715fa1aae0efb484c22399bf3f28d8f3d81a5 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Wed, 7 Aug 2024 14:57:49 -0700 Subject: [PATCH 7/8] fix the one place it really needed to be right --- eng/common/scripts/Detect-Api-Changes.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index d590ce462406..2a68f6f88486 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -111,7 +111,7 @@ foreach ($packagePropFile in $packageProperties) $packageMetadata = Get-Content $packagePropFile | ConvertFrom-Json Write-Host "Processing $($packageMetadata.ArtifactName)" - $packages = &$FindArtifactForApiReviewFn $ArtifactPath $packageMetadata.Name + $packages = &$FindArtifactForApiReviewFn $ArtifactPath $packageMetadata.ArtifactName if ($packages) { From 83fd5f7cc38d70165ad7c5552a6b2b398414c0ba Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Wed, 7 Aug 2024 15:29:30 -0700 Subject: [PATCH 8/8] resolve the last location that name is erroneously referenced --- eng/common/scripts/Detect-Api-Changes.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 2a68f6f88486..72163ce66fda 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -117,7 +117,7 @@ foreach ($packagePropFile in $packageProperties) { $pkgPath = $packages.Values[0] $isRequired = Should-Process-Package -pkgPath $pkgPath -packageName $($packageMetadata.ArtifactName) - Write-Host "Is API change detect required for $($packages.Name):$($isRequired)" + Write-Host "Is API change detect required for $($packages.ArtifactName):$($isRequired)" if ($isRequired -eq $True) { $filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/")