Skip to content

Commit

Permalink
Resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Sep 20, 2023
1 parent e4fa8b8 commit 05132aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ##
###################
Expand All @@ -104,5 +60,4 @@ function Publish-ModuleFromPathToPBR {
'--force'
)
# bicep publish @publishInput
>>>>>>> 5c6008414f381dd3a5a500006621d277859abb04
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 05132aa

Please sign in to comment.