Skip to content

Stable package check is too strict for publishing to non-isolated feeds #4680

@riarenas

Description

@riarenas
  • Is this issue blocking: yes

We currently do a NuGet version check to decide if an asset is stable and can only go to non-isolated feeds:

if (!NuGetVersion.TryParse(package.Version, out NuGetVersion version))
{
Log.LogError($"Package '{package.Id}' has invalid version '{package.Version}'");
}
// We want to avoid pushing non-final bits with final version numbers to feeds that are in general
// use by the public. This is for technical (can't overwrite the original packages) reasons as well as
// to avoid confusion. Because .NET core generally brands its "final" bits without prerelease version
// suffixes (e.g. 3.0.0-preview1), test to see whether a prerelease suffix exists.
else if (!version.IsPrerelease)
{
Log.LogError($"Package '{package.Id}' has stable version '{package.Version}' but is targeted at a non-isolated feed '{feedConfig.TargetURL}'");
}

We should relax this check, since versions in the format M.M.P.N such as 1.0.20074.5 should probably not be flagged as stable assets.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions