Skip to content

Commit

Permalink
version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Meir Blachman committed Oct 21, 2017
1 parent 624ce4d commit f5b5586
Show file tree
Hide file tree
Showing 21 changed files with 1,181 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
58 changes: 58 additions & 0 deletions Cake.Openshift.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DE522053-87A2-47BA-B6C9-1B3910CC1BD1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{B6DDD39B-7EDD-4232-BDA0-ACD05ACE8DE8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Openshift", "src\Cake.Openshift\Cake.Openshift.csproj", "{F5EA0D91-1662-4F14-986A-B25C024470E6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Openshift.Tests", "test\Cake.Openshift.Tests\Cake.Openshift.Tests.csproj", "{6380235C-51E6-4F4A-B410-B73324D21D4E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{26E7701E-0DD8-491F-9084-CAD64B7AA635}"
ProjectSection(SolutionItems) = preProject
build.cake = build.cake
build.ps1 = build.ps1
build.sh = build.sh
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{3E5D1F75-879F-4A3C-B09C-F6E7AE8796C9}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
Cake.ruleset = Cake.ruleset
LICENSE = LICENSE
Shared.msbuild = Shared.msbuild
stylecop.json = stylecop.json
Test.ruleset = Test.ruleset
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5EA0D91-1662-4F14-986A-B25C024470E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5EA0D91-1662-4F14-986A-B25C024470E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5EA0D91-1662-4F14-986A-B25C024470E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5EA0D91-1662-4F14-986A-B25C024470E6}.Release|Any CPU.Build.0 = Release|Any CPU
{6380235C-51E6-4F4A-B410-B73324D21D4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6380235C-51E6-4F4A-B410-B73324D21D4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6380235C-51E6-4F4A-B410-B73324D21D4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6380235C-51E6-4F4A-B410-B73324D21D4E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F5EA0D91-1662-4F14-986A-B25C024470E6} = {DE522053-87A2-47BA-B6C9-1B3910CC1BD1}
{6380235C-51E6-4F4A-B410-B73324D21D4E} = {B6DDD39B-7EDD-4232-BDA0-ACD05ACE8DE8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B2F5E867-4FAB-4E19-9395-556813DA3A59}
EndGlobalSection
EndGlobal
36 changes: 36 additions & 0 deletions Cake.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Cake Ruleset" ToolsVersion="12.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="AD0001" Action="None" /> <!-- Remove later -->
<Rule Id="SA0001" Action="None" /> <!-- Remove later -->
<Rule Id="SA1100" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1116" Action="None" />
<Rule Id="SA1117" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1121" Action="None" />
<Rule Id="SA1127" Action="None" />
<Rule Id="SA1128" Action="None" />
<Rule Id="SA1113" Action="None" /> <!-- Enable? -->
<Rule Id="SA1139" Action="None" /> <!-- Enable? -->
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1300" Action="None" />
<Rule Id="SA1402" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1403" Action="None" />
<Rule Id="SA1404" Action="None" />
<Rule Id="SA1413" Action="None" /> <!-- Remove later -->
<Rule Id="SA1513" Action="None" />
<Rule Id="SA1515" Action="None" />
<Rule Id="SA1600" Action="None" /> <!-- Remove later -->
<Rule Id="SA1601" Action="None" /> <!-- Remove later -->
<Rule Id="SA1602" Action="None" /> <!-- Remove later -->
<Rule Id="SA1612" Action="None" /> <!-- Remove later -->
<Rule Id="SA1625" Action="None" />
<Rule Id="SA1633" Action="None" /> <!-- Remove later -->
<Rule Id="SA1649" Action="None" />
</Rules>
</RuleSet>
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# Cake.Openshift
A set of aliases for Cake to help with running Openshift commands

## Usage

```c#
#addin "Cake.Openshift"

var target = Argument("target", "Default");

Task("Openshift-Login")
.Does(() =>
{
var username = "admin";
var password = "Password1";

OpenshiftLogin(username, password);
});

Task("Default")
.IsDependentOn("Openshift-Login");

//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);
```

## Documentation

TODO

## I cant do _insert-command-here_

If you have feature requests please submit them as issues, or better yet as pull requests :)
31 changes: 31 additions & 0 deletions Shared.msbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project>

<!-- Warnings as errors -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<!-- Attribute generation -->
<PropertyGroup>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
</PropertyGroup>

<!-- StyleCop -->
<PropertyGroup>
<CodeAnalysisRuleSet Condition="$(IsCakeTestProject) == ''">$(MSBuildThisFileDirectory)Cake.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="$(IsCakeTestProject) == 'true'">$(MSBuildThisFileDirectory)Test.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
49 changes: 49 additions & 0 deletions Test.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Cake Ruleset" ToolsVersion="12.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="AD0001" Action="None" /> <!-- Remove later -->
<Rule Id="SA0001" Action="None" /> <!-- Remove later -->
<Rule Id="SA1100" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1113" Action="None" /> <!-- Enable? -->
<Rule Id="SA1116" Action="None" />
<Rule Id="SA1117" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1121" Action="None" />
<Rule Id="SA1122" Action="None" />
<Rule Id="SA1124" Action="None" />
<Rule Id="SA1127" Action="None" />
<Rule Id="SA1128" Action="None" />
<Rule Id="SA1139" Action="None" /> <!-- Enable? -->
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1201" Action="None" />
<Rule Id="SA1202" Action="None" />
<Rule Id="SA1204" Action="None" />
<Rule Id="SA1300" Action="None" />
<Rule Id="SA1306" Action="None" />
<Rule Id="SA1310" Action="None" />
<Rule Id="SA1402" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1403" Action="None" />
<Rule Id="SA1404" Action="None" />
<Rule Id="SA1405" Action="None" />
<Rule Id="SA1413" Action="None" /> <!-- Remove later -->
<Rule Id="SA1513" Action="None" />
<Rule Id="SA1515" Action="None" />
<Rule Id="SA1516" Action="None" />
<Rule Id="SA1600" Action="None" /> <!-- Remove later -->
<Rule Id="SA1601" Action="None" /> <!-- Remove later -->
<Rule Id="SA1602" Action="None" /> <!-- Remove later -->
<Rule Id="SA1612" Action="None" /> <!-- Remove later -->
<Rule Id="SA1625" Action="None" />
<Rule Id="SA1633" Action="None" /> <!-- Remove later -->
<Rule Id="SA1649" Action="None" />
<Rule Id="SA1652" Action="None" />
<Rule Id="xUnit1012" Action="None" /> <!-- Remove later -->
<Rule Id="xUnit1013" Action="None" /> <!-- Remove later -->
<Rule Id="xUnit2000" Action="None" /> <!-- Remove later -->
<Rule Id="xUnit2002" Action="None" /> <!-- Remove later -->
<Rule Id="xUnit2003" Action="None" /> <!-- Remove later -->
<Rule Id="xUnit2004" Action="None" /> <!-- Remove later -->
</Rules>
</RuleSet>
71 changes: 71 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////

var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////

// Define directories.
var artifactsDir = Directory("./artifacts") + Directory(configuration);
var solutionFile = File("./Cake.Openshift.sln");
var testCsproj = File("./test/Cake.Openshift.Tests/Cake.Openshift.Tests.csproj");
var addinCsproj = File("./src/Cake.Openshift/Cake.Openshift.csproj");

//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////

Task("Restore-NuGet-Packages")
.Does(() =>
{
DotNetCoreRestore(solutionFile);
});

Task("Build")
.IsDependentOn("Restore-NuGet-Packages")
.Does(() =>
{
DotNetCoreBuild(solutionFile, new DotNetCoreBuildSettings
{
Configuration = configuration
});
});

Task("Run-Unit-Tests")
.IsDependentOn("Build")
.Does(() =>
{
DotNetCoreTest(testCsproj, new DotNetCoreTestSettings
{
NoBuild = true
});
});

Task("Pack")
.IsDependentOn("Run-Unit-Tests")
.Does(() =>
{
DotNetCorePack(addinCsproj, new DotNetCorePackSettings
{
Configuration = configuration,
OutputDirectory = artifactsDir,
NoBuild = true
});
});

//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////

Task("Default")
.IsDependentOn("Pack");

//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////

RunTarget(target);
Loading

0 comments on commit f5b5586

Please sign in to comment.