diff --git a/avm/utilities/pipelines/platform/Publish-ModuleFromTagToPBR.ps1 b/avm/utilities/pipelines/platform/Publish-ModuleFromTagToPBR.ps1 index feb22c64cf..31aecb7cc0 100644 --- a/avm/utilities/pipelines/platform/Publish-ModuleFromTagToPBR.ps1 +++ b/avm/utilities/pipelines/platform/Publish-ModuleFromTagToPBR.ps1 @@ -40,8 +40,8 @@ function Publish-ModuleFromTagToPBR { $targetVersion = Split-Path $ModuleReleaseTagName -Leaf $moduleRelativeFolderPath = $ModuleReleaseTagName -replace "\/$targetVersion$", '' $moduleFolderPath = Join-Path $repositoryRoot $moduleRelativeFolderPath - $moduleJsonFilePath = Join-Path $moduleFolderPath 'main.json' - Write-Verbose "Determined JSON template Path [$moduleJsonFilePath]" + $moduleBicepFilePath = Join-Path $moduleFolderPath 'main.bicep' + Write-Verbose "Determined Bicep template path [$moduleBicepFilePath]" # 2. Get the documentation link $documentationUri = Get-ModuleReadmeLink -TagName $ModuleReleaseTagName -ModuleFolderPath $moduleFolderPath @@ -53,7 +53,7 @@ function Publish-ModuleFromTagToPBR { $plainPublicRegistryServer = ConvertFrom-SecureString $PublicRegistryServer -AsPlainText $publishInput = @( - $moduleJsonFilePath + $moduleBicepFilePath '--target', ("br:{0}/public/bicep/{1}:{2}" -f $plainPublicRegistryServer, $moduleRelativeFolderPath, $targetVersion) '--documentationUri', $documentationUri '--with-source' diff --git a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 index e915ffa168..953521d606 100644 --- a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 +++ b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 @@ -46,7 +46,7 @@ function Publish-ModuleFromPathToPBR { . (Join-Path $RepoRoot 'avm' 'utilities' 'pipelines' 'sharedScripts' 'tokenReplacement' 'Convert-TokensInFileList.ps1') $moduleFolderPath = Split-Path $TemplateFilePath -Parent - $moduleJsonFilePath = Join-Path $moduleFolderPath 'main.json' + $moduleBicepFilePath = Join-Path $moduleFolderPath 'main.bicep' # 1. Test if module qualifies for publishing if (-not (Get-ModulesToPublish -ModuleFolderPath $moduleFolderPath)) { @@ -66,9 +66,9 @@ function Publish-ModuleFromPathToPBR { # 5. Get the documentation link $documentationUri = Get-ModuleReadmeLink -TagName $tagName -ModuleFolderPath $moduleFolderPath - # 6. Replace telemetry version value (in JSON) + # 6. Replace telemetry version value (in Bicep) $tokenConfiguration = @{ - FilePathList = @($moduleJsonFilePath) + FilePathList = @($moduleBicepFilePath) AbsoluteTokens = @{ '-..--..-' = $targetVersion } @@ -77,11 +77,11 @@ function Publish-ModuleFromPathToPBR { $null = Convert-TokensInFileList @tokenConfiguration # Double-check that tokens are correctly replaced - $templateContent = Get-Content -Path $moduleJsonFilePath + $templateContent = Get-Content -Path $moduleBicepFilePath $incorrectLines = @() for ($index = 0; $index -lt $templateContent.Count; $index++) { if ($templateContent[$index] -match '-..--..-') { - $incorrectLines += ('You have the token [{0}] in line [{1}] of file [{2}]. Please seek advice from the AVM team.' -f $matches[0], ($index + 1), $moduleJsonFilePath) + $incorrectLines += ('You have the token [{0}] in line [{1}] of file [{2}]. Please seek advice from the AVM team.' -f $matches[0], ($index + 1), $moduleBicepFilePath) } } if ($incorrectLines) { @@ -94,7 +94,7 @@ function Publish-ModuleFromPathToPBR { $plainPublicRegistryServer = ConvertFrom-SecureString $PublicRegistryServer -AsPlainText $publishInput = @( - $moduleJsonFilePath + $moduleBicepFilePath '--target', ("br:{0}/public/bicep/{1}:{2}" -f $plainPublicRegistryServer, $publishedModuleName, $targetVersion) '--documentationUri', $documentationUri '--with-source'