Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions OneFlow/Publish-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,27 @@ Write-Information ((Get-ParsedBuildVersionXML -BuildInfo $buildInfo).GetEnumerat

# merging the tag to develop branch on the official repository triggers the official build and release of the NuGet Packages
$tagName = Get-BuildVersionTag $buildInfo

# This will get the name of the remote matching $buildInfo['OfficialGitRemoteUrl'])
$officialRemoteName = Get-GitRemoteName $buildInfo official

# This will get the first remote that is NOT the official repo remote URL
# This assumes there is only one such named remote. (Usually 'origin')
$forkRemoteName = Get-GitRemoteName $buildInfo fork

if([string]::IsNullOrWhiteSpace($officialRemoteName))
{
throw "Official (official) remote is not available"
}

if([string]::IsNullOrWhiteSpace($forkRemoteName))
{
throw "Fork (origin) remote is not available"
}

Write-Information "Official Remote Name: $officialRemoteName"
Write-Information "Fork Remote Name: $forkRemoteName"

$releaseBranch = "release/$tagName"
$officialReleaseBranch = "$officialRemoteName/$releaseBranch"

Expand Down
17 changes: 17 additions & 0 deletions OneFlow/Start-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,26 @@ Param(
)
$buildInfo = Initialize-BuildEnvironment

# This will get the name of the remote matching $buildInfo['OfficialGitRemoteUrl'])
$officialRemoteName = Get-GitRemoteName $buildInfo official

# This will get the first remote that is NOT the official repo remote URL
# This assumes there is only one such named remote. (Usually 'origin')
$forkRemoteName = Get-GitRemoteName $buildInfo fork

if([string]::IsNullOrWhiteSpace($officialRemoteName))
{
throw "Official (official) remote is not available"
}

if([string]::IsNullOrWhiteSpace($forkRemoteName))
{
throw "Fork (origin) remote is not available"
}

Write-Information "Official Remote Name: $officialRemoteName"
Write-Information "Fork Remote Name: $forkRemoteName"

# create new local branch for the release
$branchName = "release/$(Get-BuildVersionTag $buildInfo)"
Write-Information "Creating release branch in local repo"
Expand Down