Set ReleaseSuffix in test asset
This commit is contained in:
parent
efcae15d0d
commit
0b8d850377
3 changed files with 20 additions and 2 deletions
|
@ -127,6 +127,7 @@
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||||
ToolPath="$(OutputDirectory)"
|
ToolPath="$(OutputDirectory)"
|
||||||
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
||||||
|
ReleaseSuffix="%(TestPackageProject.ReleaseSuffix)"
|
||||||
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
|
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
|
<ReleaseSuffix>$(ReleaseSuffix)</ReleaseSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
|
<ReleaseSuffix></ReleaseSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
|
||||||
|
@ -45,6 +47,7 @@
|
||||||
<IsApplicable>True</IsApplicable>
|
<IsApplicable>True</IsApplicable>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
|
<ReleaseSuffix></ReleaseSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override string Args
|
protected override string Args
|
||||||
{
|
{
|
||||||
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; }
|
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetReleaseSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Configuration { get; set; }
|
public string Configuration { get; set; }
|
||||||
|
@ -27,6 +27,8 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
public string VersionSuffix { get; set; }
|
public string VersionSuffix { get; set; }
|
||||||
|
|
||||||
|
public string ReleaseSuffix { get; set; }
|
||||||
|
|
||||||
public string Runtime { get; set; }
|
public string Runtime { get; set; }
|
||||||
|
|
||||||
public bool IncludeSymbols { get; set; }
|
public bool IncludeSymbols { get; set; }
|
||||||
|
@ -77,6 +79,18 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
return $"--version-suffix {VersionSuffix}";
|
return $"--version-suffix {VersionSuffix}";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $"--version-suffix \"\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetReleaseSuffix()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(ReleaseSuffix))
|
||||||
|
{
|
||||||
|
return $"-property:ReleaseSuffix={ReleaseSuffix}";
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue