Skip to content

Commit 83dbddb

Browse files
committed
CcgPlugin
1 parent b5e5a61 commit 83dbddb

File tree

8 files changed

+142
-9
lines changed

8 files changed

+142
-9
lines changed

KerberosBuildpack.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_solution", "_solution", "{
2626
README.MD = README.MD
2727
EndProjectSection
2828
EndProject
29+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CcgPlugin", "src\CcgPlugin\CcgPlugin.csproj", "{8A8F0F10-04A9-4726-9592-22ED3797761B}"
30+
EndProject
2931
Global
3032
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3133
Debug|Any CPU = Debug|Any CPU
@@ -58,6 +60,10 @@ Global
5860
{6D05C4AD-EE88-4359-8BCD-02B5C32CB26C}.Debug|Any CPU.Build.0 = Debug|Any CPU
5961
{6D05C4AD-EE88-4359-8BCD-02B5C32CB26C}.Release|Any CPU.ActiveCfg = Release|Any CPU
6062
{6D05C4AD-EE88-4359-8BCD-02B5C32CB26C}.Release|Any CPU.Build.0 = Release|Any CPU
63+
{8A8F0F10-04A9-4726-9592-22ED3797761B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
64+
{8A8F0F10-04A9-4726-9592-22ED3797761B}.Debug|Any CPU.Build.0 = Debug|Any CPU
65+
{8A8F0F10-04A9-4726-9592-22ED3797761B}.Release|Any CPU.ActiveCfg = Release|Any CPU
66+
{8A8F0F10-04A9-4726-9592-22ED3797761B}.Release|Any CPU.Build.0 = Release|Any CPU
6167
EndGlobalSection
6268
GlobalSection(SolutionProperties) = preSolution
6369
HideSolutionNode = FALSE
@@ -74,5 +80,6 @@ Global
7480
{512F3F46-B79C-40C7-B148-7E1DDDE3DA54} = {7BF14C44-4B4C-4973-B7AD-1C2D45242AE2}
7581
{F6E63DDE-EC41-4756-A6A3-7BF6A3ACC172} = {A989B8EF-B8C1-4BA9-BF91-B3B0529E4584}
7682
{6D05C4AD-EE88-4359-8BCD-02B5C32CB26C} = {7BF14C44-4B4C-4973-B7AD-1C2D45242AE2}
83+
{8A8F0F10-04A9-4726-9592-22ED3797761B} = {7BF14C44-4B4C-4973-B7AD-1C2D45242AE2}
7784
EndGlobalSection
7885
EndGlobal

build/Build.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Nuke.Common.Tools.DotNet;
1616
using Nuke.Common.Tools.GitHub;
1717
using Nuke.Common.Tools.GitVersion;
18+
using Nuke.Common.Tools.NerdbankGitVersioning;
1819
using Nuke.Common.Utilities.Collections;
1920
using Octokit;
2021
using static Nuke.Common.IO.FileSystemTasks;
@@ -41,7 +42,7 @@ public enum StackType
4142
}
4243
public static int Main () => Execute<Build>(x => x.Publish);
4344
const string BuildpackProjectName = "KerberosBuildpack";
44-
string GetPackageZipName(string runtime) => $"{BuildpackProjectName}-{runtime}-{GitVersion.MajorMinorPatch}.zip";
45+
string GetPackageZipName(string runtime) => $"{BuildpackProjectName}-{runtime}-{GitVersion.NuGetPackageVersion}.zip";
4546

4647

4748
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
@@ -55,6 +56,7 @@ public enum StackType
5556

5657
[Parameter("Application directory against which buildpack will be applied")]
5758
readonly string ApplicationDirectory;
59+
5860

5961
IEnumerable<PublishTarget> PublishCombinations
6062
{
@@ -69,7 +71,8 @@ IEnumerable<PublishTarget> PublishCombinations
6971

7072
[Solution] readonly Solution Solution;
7173
[GitRepository] readonly GitRepository GitRepository;
72-
[GitVersion] readonly GitVersion GitVersion;
74+
[NerdbankGitVersioning(UpdateBuildNumber = true)] readonly NerdbankGitVersioning GitVersion;
75+
7376

7477
AbsolutePath SourceDirectory => RootDirectory / "src";
7578
AbsolutePath TestsDirectory => RootDirectory / "tests";
@@ -96,9 +99,9 @@ IEnumerable<PublishTarget> PublishCombinations
9699
.SetProjectFile(Solution)
97100
.SetConfiguration(Configuration)
98101

99-
.SetAssemblyVersion(GitVersion.AssemblySemVer)
100-
.SetFileVersion(GitVersion.AssemblySemFileVer)
101-
.SetInformationalVersion(GitVersion.InformationalVersion)
102+
.SetAssemblyVersion(Nuke.Common.Tools.GitVersion.GitVersion.AssemblySemVer)
103+
.SetFileVersion(Nuke.Common.Tools.GitVersion.GitVersion.AssemblySemFileVer)
104+
.SetInformationalVersion(Nuke.Common.Tools.GitVersion.GitVersion.InformationalVersion)
102105
.CombineWith(PublishCombinations, (c, p) => c
103106
.SetFramework(p.Framework)
104107
.SetRuntime(p.Runtime)));
@@ -129,9 +132,9 @@ IEnumerable<PublishTarget> PublishCombinations
129132
.SetFramework(framework)
130133
.SetRuntime(runtime)
131134
.EnableSelfContained()
132-
.SetAssemblyVersion(GitVersion.AssemblySemVer)
133-
.SetFileVersion(GitVersion.AssemblySemFileVer)
134-
.SetInformationalVersion(GitVersion.InformationalVersion)
135+
.SetAssemblyVersion(Nuke.Common.Tools.GitVersion.GitVersion.AssemblySemVer)
136+
.SetFileVersion(Nuke.Common.Tools.GitVersion.GitVersion.AssemblySemFileVer)
137+
.SetInformationalVersion(Nuke.Common.Tools.GitVersion.GitVersion.InformationalVersion)
135138
);
136139

137140
var lifecycleBinaries = Solution.GetProjects("Lifecycle*")
@@ -175,7 +178,7 @@ IEnumerable<PublishTarget> PublishCombinations
175178
var owner = gitIdParts[0];
176179
var repoName = gitIdParts[1];
177180

178-
var releaseName = $"v{GitVersion.MajorMinorPatch}";
181+
var releaseName = $"v{Nuke.Common.Tools.GitVersion.GitVersion.MajorMinorPatch}";
179182
Release release;
180183
try
181184
{

src/CcgPlugin/CcgPlugin

596 Bytes
Binary file not shown.

src/CcgPlugin/CcgPlugin.csproj

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{8A8F0F10-04A9-4726-9592-22ED3797761B}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>CcgPlugin</RootNamespace>
11+
<AssemblyName>CcgPlugin</AssemblyName>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<SignAssembly>true</SignAssembly>
15+
<AssemblyOriginatorKeyFile>CcgPlugin.snk</AssemblyOriginatorKeyFile>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="System" />
38+
<Reference Include="System.Core" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<Compile Include="Class1.cs" />
42+
<Compile Include="Properties\AssemblyInfo.cs" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<None Include="CcgPlugin.snk" />
46+
</ItemGroup>
47+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
48+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
49+
Other similar extension points exist, see Microsoft.Common.targets.
50+
<Target Name="BeforeBuild">
51+
</Target>
52+
<Target Name="AfterBuild">
53+
</Target>
54+
-->
55+
56+
</Project>

src/CcgPlugin/CcgPlugin.snk

1.14 KB
Binary file not shown.

src/CcgPlugin/Class1.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System.Runtime.InteropServices;
2+
3+
namespace CcgPlugin
4+
{
5+
[Guid("6ecda518-2010-4437-8bc3-46e752b7b172")]
6+
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
7+
8+
public interface ICcgDomainAuthCredentials
9+
{
10+
int GetPasswordCredentials (in string pluginInput, out string domainName, out string username, out string password);
11+
}
12+
[Guid("defff03c-3245-465f-8391-cc586a2d1f31")]
13+
[ClassInterface(ClassInterfaceType.None)]
14+
[ProgId("CcgCredProvider")]
15+
public class CcgCredProvider :ICcgDomainAuthCredentials
16+
{
17+
public int GetPasswordCredentials(in string pluginInput, out string domainName, out string username, out string password)
18+
{
19+
domainName = "mydomain.com";
20+
username = "myser";
21+
password = "mypassword";
22+
return 0;
23+
}
24+
}
25+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.InteropServices;
3+
4+
// General Information about an assembly is controlled through the following
5+
// set of attributes. Change these attribute values to modify the information
6+
// associated with an assembly.
7+
[assembly: AssemblyTitle("CcgPlugin")]
8+
[assembly: AssemblyDescription("")]
9+
[assembly: AssemblyConfiguration("")]
10+
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyProduct("CcgPlugin")]
12+
[assembly: AssemblyCopyright("Copyright © 2021")]
13+
[assembly: AssemblyTrademark("")]
14+
[assembly: AssemblyCulture("")]
15+
16+
// Setting ComVisible to false makes the types in this assembly not visible
17+
// to COM components. If you need to access a type in this assembly from
18+
// COM, set the ComVisible attribute to true on that type.
19+
[assembly: ComVisible(true)]
20+
21+
// The following GUID is for the ID of the typelib if this project is exposed to COM
22+
[assembly: Guid("8A8F0F10-04A9-4726-9592-22ED3797761B")]
23+
24+
// Version information for an assembly consists of the following four values:
25+
//
26+
// Major Version
27+
// Minor Version
28+
// Build Number
29+
// Revision
30+
//
31+
// You can specify all the values or you can default the Build and Revision Numbers
32+
// by using the '*' as shown below:
33+
// [assembly: AssemblyVersion("1.0.*")]
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

src/CcgPlugin/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```
2+
bin\Debug> tlbexp CcgPlugin.dll
3+
regasm CcgPlugin.dll /tlb:CcgPlugin.tlb
4+
```
5+
6+
7+

0 commit comments

Comments
 (0)