Skip to content

Commit ee21069

Browse files
[build] fix branding of Xamarin.Android.Tools.AndroidSdk (#10424)
We are seeing the error pushing to maestro: D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25415.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error : Package 'D:\a\_work\1\a\86b5ccfa-76bb-4ef4-8116-e2e3a1e113de\Xamarin.Android.Tools.AndroidSdk.1.0.106-preview.277.nupkg' already exists on 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json' with different content. ##[error].packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25415.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error : Package 'D:\a\_work\1\a\86b5ccfa-76bb-4ef4-8116-e2e3a1e113de\Xamarin.Android.Tools.AndroidSdk.1.0.106-preview.277.nupkg' already exists on 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json' with different content. D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25415.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error : Failed to publish package '[email protected]' to 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json' after 5 attempts. (Final status: ExistsAndDifferent) ##[error].packages\microsoft.dotnet.arcade.sdk\10.0.0-beta.25415.5\tools\SdkTasks\PublishArtifactsInManifest.proj(124,5): error : Failed to publish package '[email protected]' to 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json' after 5 attempts. (Final status: ExistsAndDifferent) This is because `main` and the `release/10.0.1xx-rc1` branch are both producing packages with the same version... Let's fix this by introducing the `-ci.<branch>.<commitcount>` suffix for non-release branches.
1 parent 014ac9e commit ee21069

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

external/xamarin-android-tools.override.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
BeforeTargets="SetVersion"
1717
DependsOnTargets="GetXAVersionInfo">
1818
<PropertyGroup>
19-
<PackageVersionSuffix>-preview.$(PackVersionCommitCount)</PackageVersionSuffix>
19+
<PackageVersionSuffix Condition="$(XAVersionBranch.StartsWith('release/'))">-preview.$(PackVersionCommitCount)</PackageVersionSuffix>
20+
<PackageVersionSuffix Condition="!$(XAVersionBranch.StartsWith('release/'))">-ci.$(_AndroidPackBranch).$(PackVersionCommitCount)</PackageVersionSuffix>
2021
</PropertyGroup>
2122
</Target>
2223
</Project>

0 commit comments

Comments
 (0)