From 1180d89abb307b01a8996e5c211abaefd0c2f257 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 30 Nov 2023 07:34:41 +0100 Subject: [PATCH] feat: Moved `Get-BRMRepositoryName` to `SharedScripts` (#682) ## Description - Moved `Get-BRMRepositoryName` to `SharedScripts` - Tested all 5 invocations to ensure the new paths are resolved correctly --------- Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 | 2 +- avm/utilities/pipelines/publish/Publish-ModuleFromTagToPBR.ps1 | 2 +- .../{publish/helper => sharedScripts}/Get-BRMRepositoryName.ps1 | 0 avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 | 2 +- .../pipelines/staticValidation/compliance/helper/helper.psm1 | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename avm/utilities/pipelines/{publish/helper => sharedScripts}/Get-BRMRepositoryName.ps1 (100%) diff --git a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 index 1f5fc4a5c0..84d0029db6 100644 --- a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 +++ b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 @@ -33,7 +33,7 @@ function Publish-ModuleFromPathToPBR { # Load used functions . (Join-Path $PSScriptRoot 'helper' 'Get-ModulesToPublish.ps1') . (Join-Path $PSScriptRoot 'helper' 'Get-ModuleTargetVersion.ps1') - . (Join-Path $PSScriptRoot 'helper' 'Get-BRMRepositoryName.ps1') + . (Join-Path (Split-Path $PSScriptRoot) 'sharedScripts' 'Get-BRMRepositoryName.ps1') . (Join-Path $PSScriptRoot 'helper' 'New-ModuleReleaseTag.ps1') . (Join-Path $PSScriptRoot 'helper' 'Get-ModuleReadmeLink.ps1') . (Join-Path (Split-Path $PSScriptRoot -Parent) 'sharedScripts' 'tokenReplacement' 'Convert-TokensInFileList.ps1') diff --git a/avm/utilities/pipelines/publish/Publish-ModuleFromTagToPBR.ps1 b/avm/utilities/pipelines/publish/Publish-ModuleFromTagToPBR.ps1 index 7af3b98b51..3c692f07c3 100644 --- a/avm/utilities/pipelines/publish/Publish-ModuleFromTagToPBR.ps1 +++ b/avm/utilities/pipelines/publish/Publish-ModuleFromTagToPBR.ps1 @@ -10,7 +10,7 @@ function Publish-ModuleFromTagToPBR { ) # Load used functions - . (Join-Path $PSScriptRoot 'helper' 'Get-BRMRepositoryName.ps1') + . (Join-Path (Split-Path $PSScriptRoot) 'sharedScripts' 'Get-BRMRepositoryName.ps1') . (Join-Path $PSScriptRoot 'helper' 'Get-ModuleReadmeLink.ps1') . (Join-Path (Split-Path $PSScriptRoot -Parent) 'sharedScripts' 'tokenReplacement' 'Convert-TokensInFileList.ps1') diff --git a/avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 b/avm/utilities/pipelines/sharedScripts/Get-BRMRepositoryName.ps1 similarity index 100% rename from avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 rename to avm/utilities/pipelines/sharedScripts/Get-BRMRepositoryName.ps1 diff --git a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 index 41566dae9a..2afb123a5d 100644 --- a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 +++ b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 @@ -1631,7 +1631,7 @@ function Set-ModuleReadMe { . (Join-Path $PSScriptRoot 'helper' 'Get-IsParameterRequired.ps1') . (Join-Path $PSScriptRoot 'helper' 'Get-SpecsAlignedResourceName.ps1') . (Join-Path $PSScriptRoot 'helper' 'ConvertTo-OrderedHashtable.ps1') - . (Join-Path (Split-Path $PSScriptRoot -Parent) 'publish' 'helper' 'Get-BRMRepositoryName.ps1') + . (Join-Path $PSScriptRoot 'Get-BRMRepositoryName.ps1') # Check template & make full path $TemplateFilePath = Resolve-Path -Path $TemplateFilePath -ErrorAction Stop diff --git a/avm/utilities/pipelines/staticValidation/compliance/helper/helper.psm1 b/avm/utilities/pipelines/staticValidation/compliance/helper/helper.psm1 index 305fb572de..f176c4a707 100644 --- a/avm/utilities/pipelines/staticValidation/compliance/helper/helper.psm1 +++ b/avm/utilities/pipelines/staticValidation/compliance/helper/helper.psm1 @@ -9,7 +9,7 @@ $repoRootPath = (Get-Item $PSScriptRoot).Parent.Parent.Parent.Parent.Parent.Pare . (Join-Path $repoRootPath 'avm' 'utilities' 'pipelines' 'sharedScripts' 'helper' 'Get-IsParameterRequired.ps1') . (Join-Path $repoRootPath 'avm' 'utilities' 'pipelines' 'sharedScripts' 'helper' 'ConvertTo-OrderedHashtable.ps1') . (Join-Path $repoRootPath 'avm' 'utilities' 'pipelines' 'sharedScripts' 'helper' 'Get-CrossReferencedModuleList.ps1') -. (Join-Path $repoRootPath 'avm' 'utilities' 'pipelines' 'publish' 'helper' 'Get-BRMRepositoryName.ps1') +. (Join-Path $repoRootPath 'avm' 'utilities' 'pipelines' 'sharedScripts' 'Get-BRMRepositoryName.ps1') #################################### # Load test-specific functions #