Skip to content

Commit

Permalink
Merge pull request #3 from luuksommers/develop
Browse files Browse the repository at this point in the history
Add appveyor badges to master branch
  • Loading branch information
luuksommers authored Oct 23, 2017
2 parents 0de035a + 6ce096c commit 5600068
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 23 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# YamlTransform
[![Build status](https://ci.appveyor.com/api/projects/status/8hlsio9gcq9u4416?svg=true)](https://ci.appveyor.com/project/berendhaan/ymltransform)
[![Build status](https://ci.appveyor.com/api/projects/status/8hlsio9gcq9u4416/branch/master?svg=true)](https://ci.appveyor.com/project/berendhaan/ymltransform/branch/master)


Transforms Sitecore Yml files during deployment. Like web transform for yml files.
25 changes: 25 additions & 0 deletions src/YmlTransform/Models/Options.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using CommandLine;

namespace YmlTransform.Models
{
class Options
{
/// <summary>
/// Path to folder containing .yml files
/// </summary>
[Option('p', "path", Required = true, HelpText = "Path to folder containing .yml files")]
public string Path { get; set; }

/// <summary>
/// Walk recursive through the folder structure
/// </summary>
[Option('r', "recursive", Required = false, HelpText = "Loop recursively", DefaultValue = false)]
public bool Recursive { get; set; }

/// <summary>
/// Path to the file containing the transformations
/// </summary>
[Option('t', "transform", Required = true, HelpText = "Transformation file")]
public string TransformFile { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace YmlTransform
namespace YmlTransform.Models
{
class TransformItem
{
Expand Down
22 changes: 1 addition & 21 deletions src/YmlTransform/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommandLine;
using Rainbow.Model;
using Rainbow.Storage.Yaml;
using YmlTransform.Models;

namespace YmlTransform
{
Expand All @@ -21,17 +13,5 @@ static void Main(string[] args)
YmlTransformer.TransformPath(options.Path, options.TransformFile, options.Recursive);
}
}

class Options
{
[Option('p', "path", Required = true, HelpText = "Path to process")]
public string Path { get; set; }

[Option('r', "recursive", Required = false, HelpText = "Loop recursively", DefaultValue = false)]
public bool Recursive { get; set; }

[Option('t', "transform", Required = true, HelpText = "Transformation file")]
public string TransformFile { get; set; }
}
}
}
3 changes: 2 additions & 1 deletion src/YmlTransform/YmlTransform.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Models\Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TransformItem.cs" />
<Compile Include="Models\TransformItem.cs" />
<Compile Include="YmlTransformer.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/YmlTransform/YmlTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using Rainbow.Model;
using Rainbow.Storage.Yaml;
using YmlTransform.Models;

namespace YmlTransform
{
Expand Down
5 changes: 5 additions & 0 deletions tests/YmlTransform.Tests/YmlTransform.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\xunit.runner.visualstudio.2.3.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.3.0\build\net20\xunit.runner.visualstudio.props')" />
<Import Project="..\..\packages\xunit.core.2.3.0\build\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.3.0\build\xunit.core.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -88,13 +89,17 @@
<ItemGroup>
<Analyzer Include="..\..\packages\xunit.analyzers.0.7.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\xunit.core.2.3.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.3.0\build\xunit.core.props'))" />
<Error Condition="!Exists('..\..\packages\xunit.core.2.3.0\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.3.0\build\xunit.core.targets'))" />
<Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.3.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.3.0\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<Import Project="..\..\packages\xunit.core.2.3.0\build\xunit.core.targets" Condition="Exists('..\..\packages\xunit.core.2.3.0\build\xunit.core.targets')" />
</Project>
1 change: 1 addition & 0 deletions tests/YmlTransform.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
<package id="xunit.core" version="2.3.0" targetFramework="net462" />
<package id="xunit.extensibility.core" version="2.3.0" targetFramework="net462" />
<package id="xunit.extensibility.execution" version="2.3.0" targetFramework="net462" />
<package id="xunit.runner.visualstudio" version="2.3.0" targetFramework="net462" developmentDependency="true" />
</packages>

0 comments on commit 5600068

Please sign in to comment.