2016-08-19 21:52:06 +00:00
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
2016-08-25 22:53:15 +00:00
|
|
|
using Microsoft.Build.Framework;
|
|
|
|
using Microsoft.Build.Utilities;
|
|
|
|
|
2016-08-19 21:52:06 +00:00
|
|
|
namespace Microsoft.DotNet.Cli.Build
|
|
|
|
{
|
|
|
|
public class DotNetDebTool : DotNetTool
|
|
|
|
{
|
|
|
|
protected override string Command
|
|
|
|
{
|
|
|
|
get { return "deb-tool"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override string Args
|
|
|
|
{
|
|
|
|
get { return $"{GetInputDir()} {GetOutputFile()} {GetPackageName()} {GetPackageVersion()}"; }
|
|
|
|
}
|
|
|
|
|
|
|
|
[Required]
|
2016-08-28 00:49:21 +00:00
|
|
|
public string InputDirectory { get; set; }
|
2016-08-19 21:52:06 +00:00
|
|
|
|
|
|
|
[Required]
|
2016-08-28 00:49:21 +00:00
|
|
|
public string OutputDirectory { get; set; }
|
2016-08-19 21:52:06 +00:00
|
|
|
|
|
|
|
[Required]
|
|
|
|
public string PackageName { get; set; }
|
|
|
|
|
|
|
|
[Required]
|
|
|
|
public string PackageVersion { get; set; }
|
|
|
|
|
|
|
|
private string GetInputDir()
|
|
|
|
{
|
2016-08-28 00:49:21 +00:00
|
|
|
return $"-i {InputDirectory}";
|
2016-08-19 21:52:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private string GetOutputFile()
|
|
|
|
{
|
2016-08-28 00:49:21 +00:00
|
|
|
return $"-o {OutputDirectory}";
|
2016-08-19 21:52:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private string GetPackageName()
|
|
|
|
{
|
|
|
|
return $"-n {PackageName}";
|
|
|
|
}
|
|
|
|
|
|
|
|
private string GetPackageVersion()
|
|
|
|
{
|
|
|
|
return $"-v {PackageVersion}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|