mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 19:46:07 +00:00
add source indexing using SourceLink
This commit is contained in:
@@ -69,4 +69,5 @@ nunit-*.xml
|
||||
*.userprefs
|
||||
packaging/
|
||||
tools/FAKE.Core
|
||||
tools/SourceLink.Fake
|
||||
*.ncrunch*
|
||||
@@ -1,6 +1,7 @@
|
||||
@echo off
|
||||
|
||||
"tools\nuget\nuget.exe" "install" "FAKE.Core" "-OutputDirectory" "tools" "-ExcludeVersion" "-version" "2.18.1"
|
||||
"tools\nuget\nuget.exe" "install" "SourceLink.Fake" "-OutputDirectory" "tools" "-ExcludeVersion" "-version" "0.4.2"
|
||||
|
||||
:Build
|
||||
cls
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#r @"tools\FAKE.Core\tools\FakeLib.dll"
|
||||
#load "tools/SourceLink.Fake/tools/SourceLink.fsx"
|
||||
open Fake
|
||||
open System
|
||||
open SourceLink
|
||||
|
||||
let authors = ["GitHub"]
|
||||
|
||||
@@ -94,6 +96,24 @@ Target "IntegrationTests" (fun _ ->
|
||||
|> traceImportant
|
||||
)
|
||||
|
||||
Target "SourceLink" (fun _ ->
|
||||
if Pdbstr.tryFind().IsSome then
|
||||
use repo = new GitRepo(__SOURCE_DIRECTORY__)
|
||||
[ "Octokit/Octokit.csproj"
|
||||
"Octokit/Octokit-netcore45.csproj"
|
||||
"Octokit/Octokit-Portable.csproj"
|
||||
"Octokit.Reactive/Octokit.Reactive.csproj" ]
|
||||
|> Seq.iter (fun pf ->
|
||||
let proj = VsProj.LoadRelease pf
|
||||
logfn "source linking %s" proj.OutputFilePdb
|
||||
let files = (proj.Compiles -- "SolutionInfo.cs").SetBaseDirectory __SOURCE_DIRECTORY__
|
||||
repo.VerifyChecksums files
|
||||
proj.VerifyPdbChecksums files
|
||||
proj.CreateSrcSrv "https://raw.githubusercontent.com/octokit/octokit.net/{0}/%var2%" repo.Revision (repo.Paths files)
|
||||
Pdbstr.exec proj.OutputFilePdb proj.OutputFilePdbSrcSrv
|
||||
)
|
||||
)
|
||||
|
||||
Target "CreateOctokitPackage" (fun _ ->
|
||||
let net45Dir = packagingDir @@ "lib/net45/"
|
||||
let netcore45Dir = packagingDir @@ "lib/netcore45/"
|
||||
@@ -101,8 +121,11 @@ Target "CreateOctokitPackage" (fun _ ->
|
||||
CleanDirs [net45Dir; netcore45Dir; portableDir]
|
||||
|
||||
CopyFile net45Dir (buildDir @@ "Release/Net45/Octokit.dll")
|
||||
CopyFile net45Dir (buildDir @@ "Release/Net45/Octokit.pdb")
|
||||
CopyFile netcore45Dir (buildDir @@ "Release/NetCore45/Octokit.dll")
|
||||
CopyFile netcore45Dir (buildDir @@ "Release/NetCore45/Octokit.pdb")
|
||||
CopyFile portableDir (buildDir @@ "Release/Portable/Octokit.dll")
|
||||
CopyFile portableDir (buildDir @@ "Release/Portable/Octokit.pdb")
|
||||
CopyFiles packagingDir ["LICENSE.txt"; "README.md"; "ReleaseNotes.md"]
|
||||
|
||||
NuGet (fun p ->
|
||||
@@ -124,6 +147,7 @@ Target "CreateOctokitReactivePackage" (fun _ ->
|
||||
CleanDirs [net45Dir]
|
||||
|
||||
CopyFile net45Dir (reactiveBuildDir @@ "Release/Net45/Octokit.Reactive.dll")
|
||||
CopyFile net45Dir (reactiveBuildDir @@ "Release/Net45/Octokit.Reactive.pdb")
|
||||
CopyFiles reactivePackagingDir ["LICENSE.txt"; "README.md"; "ReleaseNotes.md"]
|
||||
|
||||
NuGet (fun p ->
|
||||
@@ -150,7 +174,7 @@ Target "CreatePackages" DoNothing
|
||||
"Clean"
|
||||
==> "AssemblyInfo"
|
||||
==> "CheckProjects"
|
||||
==> "BuildApp"
|
||||
==> "BuildApp"
|
||||
|
||||
"UnitTests"
|
||||
==> "Default"
|
||||
@@ -161,9 +185,11 @@ Target "CreatePackages" DoNothing
|
||||
"IntegrationTests"
|
||||
==> "Default"
|
||||
|
||||
"CreateOctokitPackage"
|
||||
"SourceLink"
|
||||
==> "CreateOctokitPackage"
|
||||
==> "CreatePackages"
|
||||
"CreateOctokitReactivePackage"
|
||||
"SourceLink"
|
||||
==> "CreateOctokitReactivePackage"
|
||||
==> "CreatePackages"
|
||||
|
||||
RunTargetOrDefault "Default"
|
||||
|
||||
Reference in New Issue
Block a user