Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions eng/scripts/Generate-Patch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function GetRemoteName($MainRemoteUrl) {
return $null
}

function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $ReleaseVersion, $RepoRoot, $RemoteName) {
function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $ReleaseVersion, $RepoRoot, $RemoteName, $GroupId = "com.azure") {
$ReleaseTag = "${ArtifactName}_${ReleaseVersion}"
Comment thread
raych1 marked this conversation as resolved.
Outdated
Write-Information "Resetting the $ArtifactName sources to the release $ReleaseTag."

Expand All @@ -92,7 +92,7 @@ function ResetSourcesToReleaseTag($ArtifactName, $ServiceDirectoryName, $Release
$ArtifactDirPath = Join-Path $ServiceDirPath $ArtifactName
TestPathThrow -Path $ArtifactDirPath -PathName 'ArtifactDirPath'

$pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName
$pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName -GroupId $GroupId
$currentPackageVersion = $pkgProperties.Version
if($currentPackageVersion -eq $ReleaseVersion) {
Write-Information "We do not have to reset the sources."
Expand Down Expand Up @@ -162,7 +162,7 @@ function CreatePatchRelease($ArtifactName, $ServiceDirectoryName, $PatchVersion,
$EngVersioningDir = Join-Path $EngDir "versioning"
$SetVersionFilePath = Join-Path $EngVersioningDir "set_versions.py"
$UpdateVersionFilePath = Join-Path $EngVersioningDir "update_versions.py"
$pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName
$pkgProperties = Get-PkgProperties -PackageName $ArtifactName -ServiceDirectory $ServiceDirectoryName -GroupId $GroupId
$ChangelogPath = $pkgProperties.ChangeLogPath
$PomFilePath = Join-Path $pkgProperties.DirectoryPath "pom.xml"

Expand Down Expand Up @@ -264,7 +264,7 @@ try {

## Hard resetting it to the contents of the release tag.
## Fetching all the tags from the remote branch
ResetSourcesToReleaseTag -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -ReleaseVersion $ReleaseVersion -RepoRoot $RepoRoot -RemoteName $RemoteName
ResetSourcesToReleaseTag -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -ReleaseVersion $ReleaseVersion -RepoRoot $RepoRoot -RemoteName $RemoteName -GroupId $GroupId
CreatePatchRelease -ArtifactName $ArtifactName -ServiceDirectoryName $ServiceDirectoryName -PatchVersion $PatchVersion -RepoRoot $RepoRoot
$cmdOutput = git add $RepoRoot
if($LASTEXITCODE -ne 0) {
Expand Down
4 changes: 2 additions & 2 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory)
PackageId = $pkgId
GroupId = $groupId
PackageVersion = $pkgVersion
ReleaseTag = "$($pkgId)_$($pkgVersion)"
ReleaseTag = "$($groupId)+$($pkgId)_$($pkgVersion)"
Deployable = $forceCreate -or !(IsMavenPackageVersionPublished -pkgId $pkgId -pkgVersion $pkgVersion -groupId $groupId.Replace(".", "/"))
ReleaseNotes = $releaseNotes
ReadmeContent = $readmeContent
Expand Down Expand Up @@ -548,7 +548,7 @@ function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseD
# -ll option says "only update README and CHANGELOG entries for libraries that are on the list"
python "$EngDir/versioning/update_versions.py" --library-list $fullLibraryName
& "$EngCommonScriptsDir/Update-ChangeLog.ps1" -Version $Version -ServiceDirectory $ServiceDirectory -PackageName $PackageName `
-Unreleased $False -ReplaceLatestEntryTitle $ReplaceLatestEntryTitle -ReleaseDate $ReleaseDate
-Unreleased $False -ReplaceLatestEntryTitle $ReplaceLatestEntryTitle -ReleaseDate $ReleaseDate -GroupId $GroupId
}

function GetExistingPackageVersions ($PackageName, $GroupId=$null)
Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/bomhelpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function GeneratePatch($PatchInfo, [string]$BranchName, [string]$RemoteName, [st

$releaseTag = "$($artifactId)_$($releaseVersion)"
Comment thread
raych1 marked this conversation as resolved.
Outdated
Comment thread
raych1 marked this conversation as resolved.
Outdated
if (!$currentPomFileVersion -or !$artifactDirPath -or !$changelogPath) {
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectoryName)
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectoryName -GroupId $GroupId)
$artifactDirPath = $pkgProperties.DirectoryPath
$currentPomFileVersion = $pkgProperties.Version
$changelogPath = $pkgProperties.ChangeLogPath
Expand Down
4 changes: 2 additions & 2 deletions eng/scripts/patchhelpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function UpdateCIInformation($ArtifactInfos) {
$serviceDirectory = $arInfo.ServiceDirectoryName

if (!$serviceDirectory) {
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectory)
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName $artifactId -ServiceDirectory $serviceDirectory -GroupId $arInfo.GroupId)
$arInfo.ServiceDirectoryName = $pkgProperties.ServiceDirectory
$arInfo.ArtifactDirPath = $pkgProperties.DirectoryPath
$arInfo.CurrentPomFileVersion = $pkgProperties.Version
Expand Down Expand Up @@ -188,7 +188,7 @@ function UpdateDependenciesInVersionClient([hashtable]$ArtifactInfos) {

# Get the release version for the next bom artifact.
function GetNextBomVersion() {
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName "azure-sdk-bom")
$pkgProperties = [PackageProps](Get-PkgProperties -PackageName "azure-sdk-bom" -GroupId "com.azure")
$currentVersion = $pkgProperties.Version

$patchVersion = GetPatchVersion -ReleaseVersion $currentVersion
Expand Down