diff --git a/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromPathToPBR.ps1 b/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromPathToPBR.ps1 index 28ba457be7..753aeb80c3 100644 --- a/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromPathToPBR.ps1 +++ b/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromPathToPBR.ps1 @@ -19,20 +19,14 @@ function Publish-ModuleFromPathToPBR { $moduleFolderPath = Split-Path $TemplateFilePath -Parent $moduleJsonFilePath = Join-Path $moduleFolderPath 'main.json' -<<<<<<< HEAD - # 1. Test if module qualifies for publishing - if (-not (Test-ModuleQualifiesForPublish -ModuleFolderPath $moduleFolderPath)) { - Write-Verbose "No changes detected. Skipping publishing" -Verbose - return -======= # 1. Test if module qualifies for publishing - if (-not (Test-ModuleQualifiesForPublish -moduleFolderPath $moduleFolderPath)) { + if (-not (Get-ModulesToPublish -ModuleFolderPath $moduleFolderPath)) { Write-Verbose "No changes detected. Skipping publishing" -Verbose return } # 2. Calculate the version that we would publish with - $targetVersion = Get-ModuleTargetVersion -moduleFolderPath $moduleFolderPath + $targetVersion = Get-ModuleTargetVersion -ModuleFolderPath $moduleFolderPath # 3. Get Target Published Module Name $publishedModuleName = Get-BRMRepositoryName -TemplateFilePath $TemplateFilePath @@ -48,50 +42,12 @@ function Publish-ModuleFromPathToPBR { FilePathList = @($moduleJsonFilePath) Tokens = @{ 'moduleVersion' = $targetVersion ->>>>>>> 5c6008414f381dd3a5a500006621d277859abb04 } TokenPrefix = '[[' TokenSuffix = ']]' } $null = Convert-TokensInFileList @tokenConfiguration -<<<<<<< HEAD - # 2. Calculate the version that we would publish with - $targetVersion = Get-ModuleTargetVersion -ModuleFolderPath $moduleFolderPath - - # 3. Get Target Published Module Name - $publishedModuleName = Get-BRMRepositoryName -TemplateFilePath $TemplateFilePath - - # 4.Create release tag - Set-ModuleReleaseTag -ModuleFolderPath $moduleFolderPath - - # 5. Get the documentation link - $documentationUri = Get-ModuleReadmeLink -ModuleFolderPath $moduleFolderPath - - # 6. Replace telemetry version value (in JSON) - $tokenConfiguration = @{ - FilePathList = @($moduleJsonFilePath) - Tokens = @{ - 'moduleVersion' = $targetVersion - } - TokenPrefix = '[[' - TokenSuffix = ']]' - } - $null = Convert-TokensInFileList @tokenConfiguration - - ################### - ## 7. Publish ## - ################### - $plainPublicRegistryServer = ConvertFrom-SecureString $PublicRegistryServer -AsPlainText - - $publishInput = @( - $moduleJsonFilePath - '--target', ("br:{0}/public/bicep/{1}:{2}" -f $plainPublicRegistryServer, $publishedModuleName, $targetVersion) - '--documentationUri', $documentationUri - '--force' - ) - # bicep publish @publishInput -======= ################### ## 7. Publish ## ################### @@ -104,5 +60,4 @@ function Publish-ModuleFromPathToPBR { '--force' ) # bicep publish @publishInput ->>>>>>> 5c6008414f381dd3a5a500006621d277859abb04 -} +} \ No newline at end of file diff --git a/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromTagToPBR.ps1 b/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromTagToPBR.ps1 index 3af97f9c46..d80cbabe59 100644 --- a/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromTagToPBR.ps1 +++ b/avm/utilities/pipelines/resourcePublish/Publish-ModuleFromTagToPBR.ps1 @@ -1,16 +1,9 @@ function Publish-ModuleFromTagToPBR { -<<<<<<< HEAD - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] $ModuleReleaseTagName, -======= [CmdletBinding()] param ( [Parameter(Mandatory = $true)] - [string] $TemplateFilePath, ->>>>>>> 5c6008414f381dd3a5a500006621d277859abb04 + [string] $ModuleReleaseTagName, [Parameter(Mandatory = $true)] [secureString] $PublicRegistryServer