public override void Build(IRootCommandMultiple root) { var parent = root.NewSubCommand("convert", "Converts between NuGet and Pundit packages and Specs"); BuildNuGetToPundit(parent); BuildPunditToNuGet(parent); }
public override void Build(IRootCommandMultiple root) { var command = root.NewSubCommand("sources", "Provides the ability to manage list of sources") .Build((cmd, arg, opt) => { cmd.NewSubCommand("info", "Prints out information about registered repositories") .OnExecute(() => _controller.Info().ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { root.NewSubCommand("search", "Search for packages in repositories") .Build((cmd, arg, opt) => { var search = arg.SingleValue("search", "Package name or name part (case insensitive)"); var localOnly = BuildLocalOption(opt); var xml = opt.NoValue("x", "xml", "Search will be formatted in XML allowing to copy-paste it as in in a manifest"); cmd.OnExecute(() => _controller.Execute(search.Value, localOnly.HasValue, xml.HasValue).ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { var command = root.NewSubCommand("publish", "Publishes package to a repository(ies)") .Build((cmd, arg, opt) => { var package = arg.SingleValue("package", "Specificies the package to publish"); var repository = opt.SingleValue("r", "repo", "name", "Specifies repository to publish to. Note that you have to have publishing permissions in that repo."); var apiKey = opt.SingleValue("k", "apikey", "key", "Specifies the apikey of the selected repo."); cmd.OnExecute(() => _controller.Execute(package.Value, repository.Value, apiKey.Value).ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { root.NewSubCommand("update", "Checks for updates and if there is a new version performs the actual update") .Build((cmd, arg, opt) => { var configuration = BuildConfigurationOption(opt); var local = BuildLocalOption(opt); var force = BuildForceOption(opt); var ping = BuildDryRunOption(opt); cmd.OnExecute(() => _controller.Execute(configuration.Value, local.HasValue, force.HasValue, ping.HasValue).ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { root.NewSubCommand("pack", "Creates package based on manifest definition") .Build((cmd, arg, opt) => { var manifest = BuildManifestArgument(arg); //manifest = BuildManifestOption(opt); var output = opt.SingleValue("o", "output", "directory", "Specifies the output directory for the package"); var version = opt.SingleValue("v", "versionRelease", "versionNumber", "Overrides the version number inside the manifest"); var releaseLabel = BuildReleaseLabel(opt); var type = opt.SingleFixedValue("t", "type", "packageType", "The type of package to produce. Default: NuGet", Enum.GetNames(typeof(PackType))); cmd.OnExecute(() => _controller.Execute(manifest.Value, output.Value, version.Value, releaseLabel.Value, type.Value).ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { root.NewSubCommand("resolve", "Resolves dependencies and refresh project packages specifiend in the manifest") .Build((cmd, arg, opt) => { var manifest = BuildManifestOption(opt); var configuration = BuildConfigurationOption(opt); var local = BuildLocalOption(opt); var force = BuildForceOption(opt); var ping = BuildDryRunOption(opt); var releaseLabel = BuildReleaseLabel(opt); var repository = BuildRepositoryOption(opt); cmd.OnExecute(() => _controller.Execute(manifest.Value, configuration.Value, local.HasValue, force.HasValue, ping.HasValue, releaseLabel.Value, repository.Value).ToInteger()); }); }
public override void Build(IRootCommandMultiple root) { root.NewSubCommand("spec", "Creates an empty (and invalid) manifest") .OnExecute(() => _controller.Execute().ToInteger()); }
public override void Build(IRootCommandMultiple root) { var parent = root.NewSubCommand("util", "Utilities"); BuildNuGetEncryptCommand(parent); }