mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* Introduce 'NoFramework' switch This enables building via cake on linux without requiring adjustments on other platforms, fixes #1745 * Revert hardcoding NoFramework in build.sh * Skip GitVersion query for NoFramework build This implies that NoFramework is intended for local use only Accordingly a warning message has been set up in the Lifetime of the Build * Rename NoFramework switch to CoreOnly * Skip tool installation and formatting step for CoreOnly builds * Default CoreOnly to false on windows and true otherwise * Add CoreOnly switch to build variable output * Fix 'native' msbuild on windows for both platforms 'native' msbuild invocations do not automatically set CoreOnly according to the platform they are running on. As such we set CoreOnly to False on Windows, unless CoreOnly has been specified already.
20 lines
685 B
C#
20 lines
685 B
C#
using Cake.Common.Tools.DotNetCore;
|
|
using Cake.Common.Tools.DotNetCore.Build;
|
|
using Cake.Core;
|
|
using Cake.Frosting;
|
|
|
|
[Dependency(typeof(Restore))]
|
|
public class Build : FrostingTask<Context>
|
|
{
|
|
public override void Run(Context context)
|
|
{
|
|
context.DotNetCoreBuild("./Octokit.sln", new DotNetCoreBuildSettings
|
|
{
|
|
Configuration = context.Configuration,
|
|
ArgumentCustomization = args => args
|
|
.Append("/p:Version={0}", context.Version.GetSemanticVersion())
|
|
.Append("/p:SourceLinkCreate={0}", context.LinkSources.ToString().ToLower())
|
|
.Append("/p:CoreOnly={0}", context.CoreOnly),
|
|
});
|
|
}
|
|
} |