Skip to content

Commit

Permalink
chore: initial rename publish to assemble #53
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoopereira committed Oct 22, 2021
1 parent 1c3e633 commit d95220c
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using Cmf.Common.Cli.Attributes;
using Cmf.Common.Cli.Constants;
using Cmf.Common.Cli.Factories;
using Cmf.Common.Cli.Interfaces;
using Cmf.Common.Cli.Objects;
using Cmf.Common.Cli.Utilities;
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.IO;
using System.IO.Abstractions;
using System.IO.Compression;
using System.IO.Abstractions;
using System.Linq;
using System.Xml.Linq;

Expand All @@ -20,8 +16,8 @@ namespace Cmf.Common.Cli.Commands
///
/// </summary>
/// <seealso cref="Cmf.Common.Cli.Commands.BaseCommand" />
[CmfCommand("publish")]
public class PublishCommand : BaseCommand
[CmfCommand("assemble")]
public class AssembleCommand : BaseCommand
{
#region Private Methods

Expand Down Expand Up @@ -119,6 +115,7 @@ private void PublishPackageToOutput(IDirectoryInfo outputDir, Uri repoUri, strin
}

#endregion

/// <summary>
/// Configure command
/// </summary>
Expand All @@ -127,16 +124,16 @@ public override void Configure(Command cmd)
{
cmd.AddArgument(new Argument<IDirectoryInfo>(
name: "workingDir",
parse: (argResult) => Parse<IDirectoryInfo>(argResult, "."),
isDefault: true
)
{
Description = "Working Directory"
parse: (argResult) => Parse<IDirectoryInfo>(argResult, "."),
isDefault: true
)
{
Description = "Working Directory"
});

cmd.AddOption(new Option<IDirectoryInfo>(
aliases: new string[] { "-o", "--outputDir" },
parseArgument: argResult => Parse<IDirectoryInfo>(argResult, "Package"),
parseArgument: argResult => Parse<IDirectoryInfo>(argResult, "Package"),
isDefault: true,
description: "Output directory for created package"));

Expand Down Expand Up @@ -192,7 +189,7 @@ public void Execute(CmfPackage cmfPackage, IDirectoryInfo outputDir, Uri repoUri
{
return;
}

if (publishTests)
{
IDirectoryInfo outputTestDir = this.fileSystem.DirectoryInfo.FromDirectoryName(outputDir + "/Tests");
Expand All @@ -206,7 +203,6 @@ public void Execute(CmfPackage cmfPackage, IDirectoryInfo outputDir, Uri repoUri

try
{

List<string> loadedPackages = new List<string>();

// Get Local Package.
Expand Down

0 comments on commit d95220c

Please sign in to comment.