-
-
Notifications
You must be signed in to change notification settings - Fork 177
Cake Addin for getting Nerdbank.GitVersioning VersionOracle. #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
f5a5b9a
defaba8
6ad23e1
c09ca3e
ff3cf91
d5c72e1
1b23e88
ec26ac1
1451dd7
1c950f7
59797df
7306e7e
f28cc46
a3010e3
6f16b00
2f83f81
9eaa40a
7be4fe4
b923999
8b302da
fb4597f
d087ffc
64986f2
ce09c5e
167b90f
8fa3615
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net461</TargetFramework> | ||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
| <Authors>Chris Crutchfield, Andrew Arnott</Authors> | ||
| <Company>andarno</Company> | ||
| <Description>Cake wrapper for Nerdbank.GitVersioning. Stamps your assemblies with semver 2.0 compliant git commit specific version information and provides NuGet versioning information as well.</Description> | ||
| <Copyright>Copyright © Andrew Arnott</Copyright> | ||
| <PackageTags>git commit versioning version assemblyinfo</PackageTags> | ||
| <PackageLicenseUrl>https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/39ac76891c/LICENSE.txt</PackageLicenseUrl> | ||
| <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | ||
| <PackageProjectUrl>http://github.com/aarnott/Nerdbank.GitVersioning</PackageProjectUrl> | ||
| <SignAssembly>false</SignAssembly> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Cake.Core" Version="0.26.0" /> | ||
| <PackageReference Include="Nerdbank.GitVersioning.LKG" Version="1.6.20-beta-gfea83a8c9e" /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've modified both of these to suppress the dependency #Closed |
||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\NerdBank.GitVersioning\NerdBank.GitVersioning.csproj" PrivateAssets="true" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Content Include="$(OutputPath)\NerdBank.GitVersioning.dll"> | ||
| <PackagePath>lib\$(TargetFramework)\</PackagePath> | ||
| <Pack>true</Pack> | ||
| </Content> | ||
|
|
||
| <Content Include="$(OutputPath)\LibGit2Sharp.dll"> | ||
| <PackagePath>lib\$(TargetFramework)</PackagePath> | ||
| <Pack>true</Pack> | ||
| </Content> | ||
| <Content Include="$(OutputPath)\lib\**\*"> | ||
| <PackagePath>lib\$(TargetFramework)\lib</PackagePath> | ||
| <Pack>true</Pack> | ||
| </Content> | ||
|
|
||
| <Content Include="$(OutputPath)\Newtonsoft.Json.dll"> | ||
| <PackagePath>lib\$(TargetFramework)</PackagePath> | ||
| <Pack>true</Pack> | ||
| </Content> | ||
|
|
||
| <Content Include="$(OutputPath)\Validation.dll"> | ||
| <PackagePath>lib\$(TargetFramework)</PackagePath> | ||
| <Pack>true</Pack> | ||
| </Content> | ||
| </ItemGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| using System.IO; | ||
| using System.Reflection; | ||
| using Cake.Core; | ||
| using Cake.Core.Annotations; | ||
| using Nerdbank.GitVersioning; | ||
|
|
||
| namespace Cake.GitVersioning | ||
| { | ||
| /// <summary> | ||
| /// Contains functionality for using Nerdbank.GitVersioning. | ||
| /// </summary> | ||
| [CakeAliasCategory("Git Versioning")] | ||
| public static class GitVersioningAliases | ||
| { | ||
| /// <summary> | ||
| /// Gets the Git Versioning version from the current repo. | ||
| /// </summary> | ||
| /// <example> | ||
| /// Task("GetVersion") | ||
| /// .Does(() => | ||
| /// { | ||
| /// Information(GetVersioningGetVersion().SemVer2) | ||
| /// }); | ||
| /// </example> | ||
| /// <param name="context">The context.</param> | ||
| /// <param name="projectDirectory">Directory to start the search for version.json.</param> | ||
| /// <returns>The version information from Git Versioning.</returns> | ||
| [CakeMethodAlias] | ||
| public static VersionOracle GitVersioningGetVersion(this ICakeContext context, string projectDirectory = ".") | ||
| { | ||
| var fullProjectDirectory = (new DirectoryInfo(projectDirectory)).FullName; | ||
|
|
||
| GitExtensions.HelpFindLibGit2NativeBinaries(Path.GetDirectoryName(Assembly.GetAssembly(typeof(GitVersioningAliases)).Location)); | ||
|
|
||
| return VersionOracle.Create(fullProjectDirectory, null, CloudBuild.Active); | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 15 | ||
| VisualStudioVersion = 15.0.26228.9 | ||
| VisualStudioVersion = 15.0.27130.2010 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{5DD5E4FA-CB73-4610-85AB-557B54E96AA9}") = "Nerdbank.GitVersioning.NuGet", "Nerdbank.GitVersioning.NuGet\Nerdbank.GitVersioning.NuGet.nuproj", "{B7DE4122-9E90-43DE-BE44-454315CFAE99}" | ||
| EndProject | ||
|
|
@@ -27,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nerdbank.GitVersioning.Task | |
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSBuildExtensionTask", "MSBuildExtensionTask\MSBuildExtensionTask.csproj", "{568CD02D-49C4-49DB-A34D-2DE9D7A0FE85}" | ||
| EndProject | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.GitVersioning", "Cake.GitVersioning\Cake.GitVersioning.csproj", "{1F267A97-DFE3-4166-83B1-9D236B7A09BD}" | ||
| EndProject | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you resolved a merge conflict by blowing away the competing addition. I need nbgv to stick around. :) #Closed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
|
|
@@ -99,8 +101,23 @@ Global | |
| {568CD02D-49C4-49DB-A34D-2DE9D7A0FE85}.Release|x64.Build.0 = Release|Any CPU | ||
| {568CD02D-49C4-49DB-A34D-2DE9D7A0FE85}.Release|x86.ActiveCfg = Release|Any CPU | ||
| {568CD02D-49C4-49DB-A34D-2DE9D7A0FE85}.Release|x86.Build.0 = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|x64.Build.0 = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Debug|x86.Build.0 = Debug|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|x64.ActiveCfg = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|x64.Build.0 = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|x86.ActiveCfg = Release|Any CPU | ||
| {1F267A97-DFE3-4166-83B1-9D236B7A09BD}.Release|x86.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {03CE16EE-A939-43FB-B846-92EB3A797ECF} | ||
| EndGlobalSection | ||
| EndGlobal | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did signing mess anything up? Otherwise, I'd prefer we sign it. #Closed
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see... Cake.Core itself isn't strong name signed. #Closed
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I initially attempted to sign the assembly, but also discovered that Cake.Core was not signed. I would be willing to submit an issue to the Cake team to see if they'd be willing to strong name sign Cake.Core. I am unsure if that would affect anything down stream of them though. #Closed
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably would impact their existing users. And my guess for a package that popular is that if they're not signed, they probably are opposed to the idea. It's OK. We can fall in line for the cake plugin. #Closed