protected override void OnBuildInitialized() { base.OnBuildInitialized(); BuildInitialized?.Invoke(); OnGitFlowInitialized(); if (IsWin) { BuildScript = ToolResolver.GetLocalTool(RootDirectory / "build.cmd"); } else { BuildScript = ToolResolver.GetLocalTool(RootDirectory / "build.sh"); } }
void RunProtoc(string options, string absolutePath) { Logger.Normal($"where we are generating protobufs from {absolutePath}"); PlatformFamily platform = EnvironmentInfo.Platform; var protocEXELookup = new Dictionary <PlatformFamily, string>() { { PlatformFamily.OSX, "protoc_mac" }, { PlatformFamily.Linux, "protoc_linux" }, { PlatformFamily.Windows, "protoc.exe" } }; AbsolutePath protocLocation = RootDirectory / $"tools/protoc/{protocEXELookup[platform]}"; var protocTool = ToolResolver.GetLocalTool(protocLocation); protocTool.Invoke($"{options}", absolutePath); }
public override object GetValue(MemberInfo member, object instance) { return(new Lazy <Tool>(() => ToolResolver.GetLocalTool(_absoluteOrRelativePath))); }