fiftyone.geolocation 4.3.1 → 4.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/ci/build-and-test.yml +5 -5
  2. package/ci/common-ci/.github/labels.yml +45 -1
  3. package/ci/common-ci/.github/workflows/sync-labels.yml +5 -0
  4. package/ci/common-ci/CiTips.md +30 -1
  5. package/ci/common-ci/README.md +73 -12
  6. package/ci/common-ci/build-and-test.yml +6 -1
  7. package/ci/common-ci/c/shared-variables.yml +15 -0
  8. package/ci/common-ci/check-merge-commit-format.yml +7 -1
  9. package/ci/common-ci/cloud-release-config.json +51 -0
  10. package/ci/common-ci/dotnet/shared-extract-and-publish-packages.yml +1 -5
  11. package/ci/common-ci/go/shared-go-list-stage.yml +64 -0
  12. package/ci/common-ci/java/readme.md +15 -1
  13. package/ci/common-ci/java/shared-package-signing-steps.yml +17 -0
  14. package/ci/common-ci/php/readme.md +15 -0
  15. package/ci/common-ci/release-config-schema.json +52 -0
  16. package/ci/common-ci/release-config-template.json +50 -1
  17. package/ci/common-ci/release-config.json +48 -123
  18. package/ci/common-ci/scripts/azure/checkSlot.ps1 +28 -0
  19. package/ci/common-ci/scripts/modules/51DAuthorizationModule/51DAuthorizationModule.psm1 +12 -5
  20. package/ci/common-ci/scripts/modules/51DDeployModule/51DDeployModule.psm1 +66 -0
  21. package/ci/common-ci/scripts/modules/51DDownloadDataFileModule/51DDownloadDataFileModule.psm1 +74 -0
  22. package/ci/common-ci/scripts/modules/51DGitModule/51DGitModule.psm1 +25 -21
  23. package/ci/common-ci/scripts/modules/51DPackageModule/51DPackageModule.Tests.ps1 +347 -9
  24. package/ci/common-ci/scripts/modules/51DPackageModule/51DPackageModule.psm1 +285 -54
  25. package/ci/common-ci/scripts/modules/51DReleaseModule/51DReleaseModule.Tests.ps1 +9 -8
  26. package/ci/common-ci/scripts/modules/51DReleaseModule/51DReleaseModule.psm1 +30 -13
  27. package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ReleaseVerifier.Tests.ps1 +342 -97
  28. package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ReleaseVerifier.psm1 +36 -2
  29. package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/SharedVariables.psm1 +2 -2
  30. package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/go-deploy-test-env-config.json +290 -0
  31. package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/go-test-env-config.json +260 -0
  32. package/ci/common-ci/scripts/modules/AzurePortalModules/51DApplicationInsightsModule/51DApplicationInsightsModule.psm1 +104 -0
  33. package/ci/common-ci/scripts/modules/AzurePortalModules/51DChecksModule/51DChecksModule.psm1 +68 -0
  34. package/ci/common-ci/scripts/modules/AzurePortalModules/51DCloudModule/51DCloudModule.psm1 +155 -0
  35. package/ci/common-ci/scripts/modules/AzurePortalModules/51DConnectAzureModule/51DConnectAzureModule.psm1 +45 -0
  36. package/ci/common-ci/scripts/modules/AzurePortalModules/51DSSLBindingsModule/51DSSLBIndingsModule.psm1 +100 -0
  37. package/ci/common-ci/scripts/modules/AzurePortalModules/51DStagingSlotModule/51DStagingSlotModule.psm1 +50 -0
  38. package/ci/common-ci/scripts/modules/AzurePortalModules/51DStorageAccountModule/51DStorageAccountModule.psm1 +248 -0
  39. package/ci/common-ci/scripts/modules/AzurePortalModules/51DTrafficManagerModule/51DTrafficManagerModule.psm1 +58 -0
  40. package/ci/common-ci/shared-auto-complete-pr-stage.yml +16 -3
  41. package/ci/common-ci/shared-create-tag-job.yml +9 -0
  42. package/ci/common-ci/shared-docker-build-steps.yml +34 -0
  43. package/ci/common-ci/shared-docker-push-steps.yml +32 -0
  44. package/ci/common-ci/shared-docker-test-http-steps.yml +69 -0
  45. package/ci/common-ci/shared-git-version-job.yml +17 -2
  46. package/ci/common-ci/shared-publish-github-stage.yml +54 -51
  47. package/ci/common-ci/shared-submodule-trigger-stage.yml +56 -4
  48. package/ci/common-ci/shared-variables.yml +5 -1
  49. package/ci/create-packages.yml +7 -7
  50. package/ci/deploy-external.yml +1 -1
  51. package/ci/deploy-internal.yml +1 -1
  52. package/ci/shared-build-and-test-stage.yml +5 -2
  53. package/ci/shared-variables.yml +1 -7
  54. package/examples/examples.test.js +3 -3
  55. package/geoLocationPipelineBuilder.js +9 -16
  56. package/package.json +11 -7
  57. package/setup.js +1 -0
  58. package/ci/common-ci/java/shared-code-signing-steps.yml +0 -17
@@ -171,6 +171,9 @@ function Update-MavenPackageDependencies {
171
171
  .Parameter TeamProjectName
172
172
  Name ofthe repository team project
173
173
 
174
+ .Parameter IsPackagesConfig
175
+ If the current package is packages.config which requires different treatment.
176
+
174
177
  .Outputs
175
178
  Updated file content or $null of error occured
176
179
  #>
@@ -181,7 +184,9 @@ function Update-DotnetPackageFileContent {
181
184
  [Parameter(Mandatory)]
182
185
  [string]$ProjectFileContent,
183
186
  [Parameter(Mandatory)]
184
- [string]$TeamProjectName
187
+ [string]$TeamProjectName,
188
+ [Parameter(Mandatory)]
189
+ [boolean]$IsPackagesConfig
185
190
  )
186
191
  # Update each .csproj file with dependency versions.
187
192
  foreach ($dependency in $Dependencies) {
@@ -192,44 +197,143 @@ function Update-DotnetPackageFileContent {
192
197
  # That will be used to preserv the remaining of the markup,
193
198
  # apart from the version which will be updated.
194
199
  $dependencyVersion = $script:repositories."$dependency".version
195
- $matchPattern = "(?<prefix>\<PackageReference \s*Include=\`"$packageName.*\`" \s*Version=\`").*(?<suffix>\`"\s*/\>)"
196
- if ($ProjectFileContent -match "$matchPattern") {
197
- Write-Host "# Version variable matches dependency $packageName. Update."
200
+
201
+ if ($IsPackagesConfig) {
202
+ $matchPattern = "(?<prefix>\<package \s*id=\`"$packageName.*\`" \s*version=\`").*(?<suffix>\`"\s*targetFramework=\`".*\`"\s*/\>)"
203
+ if ($ProjectFileContent -match "$matchPattern") {
204
+ Write-Host "# Version variable matches dependency $packageName. Update."
205
+
206
+ # Make sure that the version exists for the dependency. Else bail out.
207
+ if (!$(Test-TagExist `
208
+ -RepositoryName $dependency `
209
+ -Version $dependencyVersion `
210
+ -TeamProjectName $TeamProjectName)) {
211
+ Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
212
+ return $null
213
+ }
214
+
215
+ # This reuse the matched group so make sure we don't lose the original package name.
216
+ $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
217
+ $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
218
+ }
219
+ } else {
220
+ $matchPattern = "(?<prefix>\<PackageReference \s*Include=\`"$packageName.*\`" \s*Version=\`").*(?<suffix>\`"\s*/\>)"
221
+ if ($ProjectFileContent -match "$matchPattern") {
222
+ Write-Host "# Version variable matches dependency $packageName. Update."
223
+
224
+ # Make sure that the version exists for the dependency. Else bail out.
225
+ if (!$(Test-TagExist `
226
+ -RepositoryName $dependency `
227
+ -Version $dependencyVersion `
228
+ -TeamProjectName $TeamProjectName)) {
229
+ Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
230
+ return $null
231
+ }
232
+
233
+ # This reuse the matched group so make sure we don't lose the original package name.
234
+ $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
235
+ $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
236
+ }
198
237
 
199
- # Make sure that the version exists for the dependency. Else bail out.
200
- if (!$(Test-TagExist `
201
- -RepositoryName $dependency `
202
- -Version $dependencyVersion `
203
- -TeamProjectName $TeamProjectName)) {
204
- Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
205
- return $null
238
+ # Version 2 of xml markup for <PackageReference></PackageReference>
239
+ $matchPattern = "(?<prefix>\<PackageReference \s*Include=\`"$packageName.*\`"\s*\>.*\r\n.*\<Version\>)(?<version>.*)(?<suffix>\</Version\>.*\r\n.*\</PackageReference\>)"
240
+ if ($ProjectFileContent -match "$matchPattern") {
241
+ Write-Host "# Version variable matches dependency $packageName. Update."
242
+
243
+ # Make sure that the version exists for the dependency. Else bail out.
244
+ if (!$(Test-TagExist `
245
+ -RepositoryName $dependency `
246
+ -Version $dependencyVersion `
247
+ -TeamProjectName $TeamProjectName)) {
248
+ Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
249
+ return $null
250
+ }
251
+
252
+ # This reuse the matched group so make sure we don't lose the original package name.
253
+ $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
254
+ $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
206
255
  }
207
256
 
208
- # This reuse the matched group so make sure we don't lose the original package name.
209
- $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
210
- $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
257
+ # If HintPath exists. This is when a project is a .Net Framework. Update the Hint Path.
258
+ $matchPattern = "(?<prefix>\<HintPath\>\s*.*$packageName.*)\d+\.\d+\.\d+.*(?<suffix>\\lib.*\<\/HintPath\>)"
259
+ if ($ProjectFileContent -match "$matchPattern") {
260
+ Write-Host "# Version variable matches dependency $packageName. Update."
261
+
262
+ # Make sure that the version exists for the dependency. Else bail out.
263
+ if (!$(Test-TagExist `
264
+ -RepositoryName $dependency `
265
+ -Version $dependencyVersion `
266
+ -TeamProjectName $TeamProjectName)) {
267
+ Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
268
+ return $null
269
+ }
270
+
271
+ # This reuse the matched group so make sure we don't lose the original package name.
272
+ $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
273
+ $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
274
+ }
211
275
  }
212
-
213
- # Version 2 of xml markup for <PackageReference></PackageReference>
214
- $matchPattern = "(?<prefix>\<PackageReference \s*Include=\`"$packageName.*\`"\s*\>.*\r\n.*\<Version\>)(?<version>.*)(?<suffix>\</Version\>.*\r\n.*\</PackageReference\>)"
215
- if ($ProjectFileContent -match "$matchPattern") {
216
- Write-Host "# Version variable matches dependency $packageName. Update."
217
-
218
- # Make sure that the version exists for the dependency. Else bail out.
219
- if (!$(Test-TagExist `
220
- -RepositoryName $dependency `
221
- -Version $dependencyVersion `
222
- -TeamProjectName $TeamProjectName)) {
223
- Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
224
- return $null
276
+ }
277
+ return $ProjectFileContent
278
+ }
279
+
280
+ <#
281
+ .Description
282
+ Update package dependencies for a package file
283
+ which can be .csproj or packages.config file.
284
+
285
+ .Parameter FilePath
286
+ Path to a package file
287
+
288
+ .Parameter Dependencies
289
+ List of dependencies to be updated
290
+
291
+ .Parameter TeamProjectName
292
+ Name of a Team Project that the changes should be
293
+ made to.
294
+
295
+ .Outputs
296
+ true or false
297
+ #>
298
+ function Update-DotnetPackageDependenciesPerFile {
299
+ param (
300
+ [Parameter(Mandatory)]
301
+ [string]$FilePath,
302
+ [Parameter(Mandatory)]
303
+ [string[]]$Dependencies,
304
+ [Parameter(Mandatory)]
305
+ [string]$TeamProjectName
306
+ )
307
+ Write-Host ""
308
+ Write-Host "# Updating package file $FilePath"
309
+ $projFileContent = $(Get-Content $FilePath -Raw)
310
+ $isPackagesConfig = $FilePath -match ".*packages.config"
311
+ $updatedContent = Update-DotnetPackageFileContent `
312
+ -Dependencies $Dependencies `
313
+ -ProjectFileContent $projFileContent `
314
+ -TeamProjectName $TeamProjectName `
315
+ -IsPackagesConfig $isPackagesConfig
316
+
317
+ # Check if content has been updated.
318
+ if ($updatedContent -ne $null) {
319
+ if ($updatedContent -ne $projFileContent) {
320
+ Write-Host "# Dependency version has been updated. Update the $FilePath content."
321
+ if (![FileHandler]::SetContent($FilePath, $updatedContent)) {
322
+ Write-Host "# ERROR: Failed to update the $FilePath content."
323
+ return $false
225
324
  }
226
325
 
227
- # This reuse the matched group so make sure we don't lose the original package name.
228
- $replaceString = '${prefix}' + "$dependencyVersion" + '${suffix}'
229
- $ProjectFileContent = $ProjectFileContent -replace "$matchPattern",$replaceString
326
+ # Stage the change
327
+ if (![GitHandler]::Add("$FilePath")) {
328
+ Write-Host "# ERROR: Failed to stage the change."
329
+ return $false
330
+ }
230
331
  }
332
+ } else {
333
+ Write-Host "# ERROR: error occurs while updating content of package file."
334
+ return $false
231
335
  }
232
- return $ProjectFileContent
336
+ return $true
233
337
  }
234
338
 
235
339
  <#
@@ -262,29 +366,22 @@ function Update-DotnetPackageDependencies {
262
366
  if ($dependencies -ne $null -and $dependencies.count -gt 0) {
263
367
  # Update each .csproj file.
264
368
  foreach ($project in $(Get-ChildItem -Filter *.csproj -Recurse)) {
265
- $projFileContent = $(Get-Content $project.FullName -Raw)
266
- $updatedContent = Update-DotnetPackageFileContent `
369
+ if (!$(Update-DotnetPackageDependenciesPerFile `
370
+ -FilePath $project.FullName `
267
371
  -Dependencies $dependencies `
268
- -ProjectFileContent $projFileContent `
269
- -TeamProjectName $TeamProjectName
270
-
271
- # Check if .csproj has been updated.
272
- if ($updatedContent -ne $null) {
273
- if ($updatedContent -ne $projFileContent) {
274
- Write-Host "# Dependency version has been updated. Update the $($project.FullName) content."
275
- if (![FileHandler]::SetContent($project.FullName, $updatedContent)) {
276
- Write-Host "# ERROR: Failed to update the $project.FullName content."
277
- return $false
278
- }
279
-
280
- # Stage the change
281
- if (![GitHandler]::Add("$($project.FullName)")) {
282
- Write-Host "# ERROR: Failed to stage the change."
283
- return $false
284
- }
285
- }
286
- } else {
287
- Write-Host "# ERROR: error occurs while updating content of package file."
372
+ -TeamProjectName $TeamProjectName)) {
373
+ Write-Host "# ERROR: Failed to update package file $($project.FullName)"
374
+ return $false
375
+ }
376
+ }
377
+
378
+ # Update each packages.config file.
379
+ foreach ($project in $(Get-ChildItem -Filter packages.config -Recurse)) {
380
+ if (!$(Update-DotnetPackageDependenciesPerFile `
381
+ -FilePath $project.FullName `
382
+ -Dependencies $dependencies `
383
+ -TeamProjectName $TeamProjectName)) {
384
+ Write-Host "# ERROR: Failed to update package file $($project.FullName)"
288
385
  return $false
289
386
  }
290
387
  }
@@ -619,6 +716,134 @@ function Update-PythonPackageDependencies {
619
716
  return $true
620
717
  }
621
718
 
719
+ <#
720
+ .Description
721
+ Update dependencies of all Golang packages in a repository.
722
+
723
+ .Parameter Dependencies
724
+ An array of dependencies
725
+
726
+ .Parameter SharedVariableContent
727
+ Content to be updated.
728
+
729
+ .Parameter TeamProjectName
730
+ Name ofthe repository team project
731
+
732
+ .Outputs
733
+ Updated content. $null if error occurs
734
+ #>
735
+ function Update-GoPackageContent {
736
+ param (
737
+ [Parameter(Mandatory)]
738
+ [string[]]$Dependencies,
739
+ [Parameter(Mandatory)]
740
+ [string]$GoModContent,
741
+ [Parameter(Mandatory)]
742
+ [string]$TeamProjectName
743
+ )
744
+ foreach ($dependency in $Dependencies) {
745
+ $matchPattern = "(?<prefix>(require|replace)\s*((?!$dependency).)*$dependency\s*)v\d+\.\d+\.\d+((?!\s).)*"
746
+ if ($GoModContent -match $matchPattern) {
747
+ Write-Host "# go.mod content match $dependency. Update."
748
+ $dependencyVersion = $script:repositories."$dependency".version
749
+
750
+ # Make sure that the version exists for the dependency. Else bail out.
751
+ if (!$(Test-TagExist `
752
+ -RepositoryName $dependency `
753
+ -Version $dependencyVersion `
754
+ -TeamProjectName $TeamProjectName)) {
755
+ Write-Host "# ERROR: Tag $dependencyVersion for repository $dependency does not exist."
756
+ return $null
757
+ }
758
+ $replaceString = '${prefix}' + "v$dependencyVersion"
759
+ $GoModContent = $GoModContent -replace `
760
+ $matchPattern, `
761
+ $replaceString
762
+ } else {
763
+ Write-Host "# Nothing to update for dependency $dependency"
764
+ }
765
+ }
766
+ return $GoModContent
767
+ }
768
+
769
+ <#
770
+ .Description
771
+ Update dependencies of all Golang packages in a repository.
772
+ This function updates go.mod but won't update go.sum. This
773
+ is not future proof, but enough for GO MVP implementation.
774
+
775
+ .Parameter RepositoryName
776
+ Name of a repository
777
+
778
+ .Parameter TeamProjectName
779
+ Name ofthe repository team project
780
+
781
+ .Outputs
782
+ true or false
783
+ #>
784
+ function Update-GoPackageDependencies {
785
+ param (
786
+ [Parameter(Mandatory)]
787
+ [string]$RepositoryName,
788
+ [Parameter(Mandatory)]
789
+ [string]$TeamProjectName
790
+ )
791
+
792
+ Write-Host ""
793
+ Write-Host "Update Go Package Dependencies"
794
+ Write-Host "================================="
795
+
796
+ # TODO: If go.sum is ever required, this approach needs to be changed. "go mod"
797
+ # will be required and dependencies will need to be available publicly to use
798
+ # "go mod". At the point of implementation, using "go mod" requires changes to
799
+ # changes to release process flow and need to be carefully considered. Thus,
800
+ # is an overkill for MVP version of go support at this point.
801
+ if (Test-Path go.sum) {
802
+ Write-Host "# ERROR: go.sum is not currently handled. " +
803
+ "Updating go.sum requires dependencies to be available publicly, " +
804
+ "so updating go.mod is not enough."
805
+ return $false
806
+ }
807
+
808
+ $dependencies = $script:repositories."$RepositoryName".dependencies
809
+ if ($dependencies -ne $null -and $dependencies.count -gt 0) {
810
+ # Check if shared-variables.yml exists
811
+ if (Test-Path go.mod) {
812
+ $goModContent = $(Get-Content go.mod -Raw)
813
+ $updatedContent = Update-GoPackageContent `
814
+ -Dependencies $dependencies `
815
+ -GoModContent $goModContent `
816
+ -TeamProjectName $TeamProjectName
817
+
818
+ if ($updatedContent -ne $null) {
819
+ # Check if go.mod has been updated.
820
+ if ($updatedContent -ne $goModContent) {
821
+ Write-Host "# Dependency version has been updated. Update the go.mod content."
822
+ if (![FileHandler]::SetContent("go.mod", $updatedContent)) {
823
+ Write-Host "# ERROR: Failed to update the go.mod content."
824
+ return $false
825
+ }
826
+
827
+ # Stage the change
828
+ if (![GitHandler]::Add("go.mod")) {
829
+ Write-Host "# ERROR: Failed to stage the change."
830
+ return $false
831
+ }
832
+ }
833
+ } else {
834
+ Write-Host "# ERROR: error occured during the update of the go.mod"
835
+ return $false
836
+ }
837
+ } else {
838
+ Write-Host "# No go.mod file is found at this directory. Nothing to update."
839
+ }
840
+ } else {
841
+ Write-Host "# There is no dependencies defined in configuration file. Skipped."
842
+ }
843
+
844
+ return $true
845
+ }
846
+
622
847
  <#
623
848
  .Description
624
849
  Update dependencies of all packages in a repository.
@@ -648,7 +873,7 @@ function Update-PackageDependencies {
648
873
 
649
874
  Write-Host ""
650
875
  Write-Host "# Update package dependencies"
651
- Write-Host "============================"
876
+ Write-Host "============================="
652
877
 
653
878
  # Initialise the script variables
654
879
  Initialize-GlobalVariables -Configuration $Configuration
@@ -683,6 +908,12 @@ function Update-PackageDependencies {
683
908
  -RepositoryName $repoName -TeamProjectName $TeamProjectName
684
909
  Break
685
910
  }
911
+ "*go" {
912
+ Write-Host "# $repoName is a Golang package."
913
+ $succeeded = Update-GoPackageDependencies `
914
+ -RepositoryName $repoName -TeamProjectName $TeamProjectName
915
+ Break
916
+ }
686
917
  Default {
687
918
  Write-Host "# $repoName is of type that do not need to update package."
688
919
  Break
@@ -26,7 +26,7 @@ Describe 'Update-CommitPushPullSub' {
26
26
  }
27
27
  }
28
28
  }' | ConvertFrom-Json
29
- $result = Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj"
29
+ $result = Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj"
30
30
  $result | Should -BeExactly $true
31
31
  }
32
32
 
@@ -42,7 +42,7 @@ Describe 'Update-CommitPushPullSub' {
42
42
  }
43
43
  }
44
44
  }' | ConvertFrom-Json
45
- $result = $(Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj")
45
+ $result = $(Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj")
46
46
  $result | Should -BeExactly $false
47
47
  }
48
48
 
@@ -60,7 +60,7 @@ Describe 'Update-CommitPushPullSub' {
60
60
  }
61
61
  }
62
62
  }' | ConvertFrom-Json
63
- $result = $(Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj")
63
+ $result = $(Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj")
64
64
  $result | Should -BeExactly $false
65
65
  }
66
66
 
@@ -80,7 +80,7 @@ Describe 'Update-CommitPushPullSub' {
80
80
  }
81
81
  }
82
82
  }' | ConvertFrom-Json
83
- $result = Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj"
83
+ $result = Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj"
84
84
  $result | Should -BeExactly $false
85
85
  }
86
86
 
@@ -102,7 +102,7 @@ Describe 'Update-CommitPushPullSub' {
102
102
  }
103
103
  }
104
104
  }' | ConvertFrom-Json
105
- $result = Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj"
105
+ $result = Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj"
106
106
  $result | Should -BeExactly $false
107
107
  }
108
108
 
@@ -128,7 +128,8 @@ Describe 'Update-CommitPushPullSub' {
128
128
  }' | ConvertFrom-Json
129
129
  $result = Update-CommitPushPullSub `
130
130
  -Configuration $configuration `
131
- -TeamProjectName "testproj"
131
+ -DepTeamProjectName "testproj" `
132
+ -PrTeamProjectName "testproj"
132
133
  $result | Should -BeExactly $false
133
134
  }
134
135
 
@@ -156,7 +157,7 @@ Describe 'Update-CommitPushPullSub' {
156
157
  }
157
158
  }
158
159
  }' | ConvertFrom-Json
159
- $result = Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj"
160
+ $result = Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj"
160
161
  $result | Should -BeExactly $true
161
162
  }
162
163
 
@@ -186,7 +187,7 @@ Describe 'Update-CommitPushPullSub' {
186
187
  }
187
188
  }
188
189
  }' | ConvertFrom-Json
189
- $result = Update-CommitPushPullSub -Configuration $configuration -TeamProjectName "testproj"
190
+ $result = Update-CommitPushPullSub -Configuration $configuration -DepTeamProjectName "testproj" -PrTeamProjectName "testproj"
190
191
  $result | Should -BeExactly $false
191
192
  }
192
193
  }
@@ -102,7 +102,7 @@ function Get-NonLeafAction {
102
102
  # Check if action required for a dependency.
103
103
  if (!$script:traveledTable[$dependency]) {
104
104
  Get-Action `
105
- -PojectName $dependency `
105
+ -RepositoryName $dependency `
106
106
  -TeamProjectName $TeamProjectName
107
107
  }
108
108
 
@@ -414,8 +414,13 @@ function Start-Release {
414
414
  .Parameter Configuration
415
415
  A configuration object from a configuration file.
416
416
 
417
- .Parameter TeamProjectName
418
- Name ofthe repository team project
417
+ .Parameter DepTeamProjectName
418
+ Name of the repository team project to be used for
419
+ dependency updates.
420
+
421
+ .Parameter PrTeamProjectName
422
+ Name of the repository team project to be used for
423
+ creating pull request to main.
419
424
 
420
425
  .Outputs
421
426
  true or false
@@ -425,7 +430,9 @@ function Update-CommitPushPullSub {
425
430
  [Parameter(Mandatory)]
426
431
  [object]$Configuration,
427
432
  [Parameter(Mandatory)]
428
- [string]$TeamProjectName
433
+ [string]$DepTeamProjectName,
434
+ [Parameter(Mandatory)]
435
+ [string]$PrTeamProjectName
429
436
  )
430
437
 
431
438
  Initialize-GlobalVariables -Configuration $Configuration
@@ -443,7 +450,7 @@ function Update-CommitPushPullSub {
443
450
  if ($(Test-TagExist `
444
451
  -RepositoryName $repoName `
445
452
  -Version $targetVersion `
446
- -TeamProjectName $TeamProjectName)) {
453
+ -TeamProjectName $PrTeamProjectName)) {
447
454
  Write-Host "# ERROR: A tag for the target version $targetVersion already exists."
448
455
  return $false
449
456
  }
@@ -453,7 +460,7 @@ function Update-CommitPushPullSub {
453
460
  Write-Host "# Checkout release branch for version $targetVersion"
454
461
  if (!$(Get-ReleaseBranch `
455
462
  -Version $targetVersion `
456
- -TeamProjectName $TeamProjectName)) {
463
+ -TeamProjectName $PrTeamProjectName)) {
457
464
  return $false
458
465
  }
459
466
 
@@ -471,7 +478,7 @@ function Update-CommitPushPullSub {
471
478
  Write-Host "# Updating package dependencies"
472
479
  if (!$(Update-PackageDependencies `
473
480
  -Configuration $Configuration `
474
- -TeamProjectName $TeamProjectName)) {
481
+ -TeamProjectName $DepTeamProjectName)) {
475
482
  return $false
476
483
  }
477
484
 
@@ -489,12 +496,12 @@ function Update-CommitPushPullSub {
489
496
  $pullRequest = Get-PullRequestToMain `
490
497
  -RepositoryName $repoName `
491
498
  -ReleaseBranch "refs/heads/$targetBranch" `
492
- -TeamProjectName $TeamProjectName
499
+ -TeamProjectName $PrTeamProjectName
493
500
  if ($pullRequest -eq $null) {
494
501
  if (!(New-PullRequestToMain `
495
502
  -RepositoryName $repoName `
496
503
  -SourceBranchRef "refs/heads/$targetBranch" `
497
- -TeamProjectName $TeamProjectName)) {
504
+ -TeamProjectName $PrTeamProjectName)) {
498
505
  return $false
499
506
  }
500
507
  } else {
@@ -512,8 +519,13 @@ function Update-CommitPushPullSub {
512
519
  .Parameter ConfigFile
513
520
  Full path to the configuration file.
514
521
 
515
- .Parameter TeamProjectName
516
- Name ofthe repository team project
522
+ .Parameter DepTeamProjectName
523
+ Name of the repository team project to be used for
524
+ dependency updates.
525
+
526
+ .Parameter PrTeamProjectName
527
+ Name of the repository team project to be used for
528
+ creating pull request to main.
517
529
 
518
530
  .Outputs
519
531
  true or false
@@ -523,13 +535,18 @@ function Update-CommitPushPull {
523
535
  [Parameter(Mandatory)]
524
536
  [string]$ConfigFile,
525
537
  [Parameter(Mandatory)]
526
- [string]$TeamProjectName
538
+ [string]$DepTeamProjectName,
539
+ [Parameter(Mandatory)]
540
+ [string]$PrTeamProjectName
527
541
  )
528
542
 
529
543
  # Reinitialise the script variables.
530
544
  $configuration = Get-Content $ConfigFile | Out-String | ConvertFrom-Json
531
545
 
532
- return Update-CommitPushPullSub -Configuration $configuration -TeamProjectName $TeamProjectName
546
+ return Update-CommitPushPullSub `
547
+ -Configuration $configuration `
548
+ -DepTeamProjectName $DepTeamProjectName `
549
+ -PrTeamProjectName $PrTeamProjectName
533
550
  }
534
551
 
535
552
  Export-ModuleMember -Function Start-Release