Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jtellnes committed Apr 30, 2018
2 parents 49677fe + 182dab0 commit bc40baa
Show file tree
Hide file tree
Showing 154 changed files with 2,592 additions and 2,788 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
###############################################################################
* text=auto

###############################################################################
# Enforce UNIX line endings for specific files
###############################################################################
src/Arkivverket.Arkade.Cli/arkade.sh text eol=lf
src/Arkivverket.Arkade.Cli/README.txt text eol=lf

###############################################################################
# Set default behavior for command prompt diff.
#
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,6 @@ paket-files/
# JetBrains Rider
.idea/
*.sln.iml

# Local launch settings
launchSettings.json
14 changes: 0 additions & 14 deletions src/Arkivverket.Arkade.Cli/App.config

This file was deleted.

107 changes: 39 additions & 68 deletions src/Arkivverket.Arkade.Cli/Arkivverket.Arkade.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,79 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D0D921D0-7B81-4EDE-A1B7-ED80C6BB368B}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Arkivverket.Arkade.Cli</RootNamespace>
<AssemblyName>Arkade</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFrameworks>netcoreapp2.0;net452</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<None Remove="arkade.sh" />
<None Remove="README.txt" />
</ItemGroup>

<ItemGroup>
<Content Include="arkade.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="README.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.2.5.0\lib\net45\Serilog.dll</HintPath>
</Reference>
<Reference Include="Serilog.Sinks.Console, Version=3.1.1.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.Sinks.Console.3.1.1\lib\net45\Serilog.Sinks.Console.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Console.4.0.0-rc2-24027\lib\net46\System.Console.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.TypeExtensions.4.1.0-rc2-24027\lib\net46\System.Reflection.TypeExtensions.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<PackageReference Include="CommandLineParser" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
<PackageReference Include="Serilog" Version="2.6.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
</ItemGroup>

<ItemGroup>
<Compile Include="CommandLineOptions.cs" />
<Compile Include="CommandLineRunner.cs" />
<Compile Include="MetadataExampleGenerator.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\Arkivverket.Arkade\Arkivverket.Arkade.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<Compile Update="OutputStrings.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>OutputStrings.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Arkivverket.Arkade\Arkivverket.Arkade.csproj">
<Project>{d4008c3c-61ef-48a4-b333-793476b7104d}</Project>
<Name>Arkivverket.Arkade</Name>
</ProjectReference>
<EmbeddedResource Update="OutputStrings.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>OutputStrings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

</Project>
29 changes: 19 additions & 10 deletions src/Arkivverket.Arkade.Cli/CommandLineOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Arkivverket.Arkade.Core;
using System;
using CommandLine;
using CommandLine.Text;

Expand All @@ -24,17 +24,26 @@ internal class CommandLineOptions
[Option('p', "processing-area", HelpText = "Directory to place temporary files and logs.")]
public string ProcessingArea { get; set; }

[Option('o', "output-directory", HelpText = "Directory to put created packages.")]
public string PackageOutputDirectory { get; set; }
[Option('o', "output-directory", HelpText = "Directory to place created package and test report.")]
public string OutputDirectory { get; set; }

[Option('v', "verbose", HelpText = "Print details during execution.")]
public bool Verbose { get; set; }

[HelpOption]
public string GetUsage()
//[Option('v', "verbose", HelpText = "Print details during execution.")]
//public bool Verbose { get; set; }

internal string GetUsage()
{
return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current));
var result = new Parser().ParseArguments<CommandLineOptions>("".Split());

var helptext = HelpText.AutoBuild(result, help =>
{
help.AddOptions(result);
return help;
}, example =>
{
return example;
});

return helptext;
}

}
}
14 changes: 11 additions & 3 deletions src/Arkivverket.Arkade.Cli/CommandLineRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public void Run(CommandLineOptions options)
{
try
{
ArkadeProcessingArea.Establish(options.ProcessingArea);

var arkade = new Core.Arkade();

var fileInfo = new FileInfo(options.Archive);
Expand All @@ -34,7 +32,9 @@ public void Run(CommandLineOptions options)

testSession.ArchiveMetadata = archiveMetadata;

arkade.CreatePackage(testSession, PackageType.SubmissionInformationPackage, options.PackageOutputDirectory);
arkade.CreatePackage(testSession, PackageType.SubmissionInformationPackage, options.OutputDirectory);

arkade.SaveReport(testSession, PrepareTestReportFile(options, testSession));
}
finally
{
Expand All @@ -61,5 +61,13 @@ private static TestSession CreateTestSession(CommandLineOptions options, Core.Ar
}
return testSession;
}

private static FileInfo PrepareTestReportFile(CommandLineOptions options, TestSession testSession)
{
string testReportFileName = string.Format(OutputStrings.TestReportFileName, testSession.Archive.Uuid);
string testReportFullPath = Path.Combine(options.OutputDirectory, testReportFileName);

return new FileInfo(testReportFullPath);
}
}
}
90 changes: 90 additions & 0 deletions src/Arkivverket.Arkade.Cli/OutputStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bc40baa

Please sign in to comment.