mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 12:26:18 +00:00
Merge pull request #602 from ctaggart/SourceIndex
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*
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
VisualStudioVersion = 12.0.30723.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit", "Octokit\Octokit.csproj", "{08DD4305-7787-4823-A53F-4D0F725A07F3}"
|
||||
EndProject
|
||||
@@ -11,6 +11,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Tests.Integration",
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{CEC9D451-6291-4EDF-971A-D398144FBF96}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
appveyor.yml = appveyor.yml
|
||||
build.cmd = build.cmd
|
||||
build.fsx = build.fsx
|
||||
script\cibuild.ps1 = script\cibuild.ps1
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
build_script:
|
||||
- cmd: build.cmd BuildApp
|
||||
- cmd: build.cmd UnitTests
|
||||
- cmd: build.cmd IntegrationTests -ev OCTOKIT_GITHUBUSERNAME "%OCTOKIT_GITHUBUSERNAME%" -ev OCTOKIT_GITHUBPASSWORD "%OCTOKIT_GITHUBPASSWORD%"
|
||||
- cmd: build.cmd SourceLink
|
||||
#- cmd: build.cmd CreatePackages
|
||||
- cmd: build.cmd CreateOctokitPackage
|
||||
- cmd: build.cmd CreateOctokitReactivePackage
|
||||
test: off
|
||||
artifacts:
|
||||
- path: packaging\*.nupkg
|
||||
@@ -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"]
|
||||
|
||||
@@ -27,6 +29,8 @@ let releaseNotes =
|
||||
|
||||
let buildMode = getBuildParamOrDefault "buildMode" "Release"
|
||||
|
||||
MSBuildDefaults <- { MSBuildDefaults with Verbosity = Some MSBuildVerbosity.Minimal }
|
||||
|
||||
Target "Clean" (fun _ ->
|
||||
CleanDirs [buildDir; reactiveBuildDir; testResultsDir; packagingRoot; packagingDir; reactivePackagingDir]
|
||||
)
|
||||
@@ -94,6 +98,23 @@ Target "IntegrationTests" (fun _ ->
|
||||
|> traceImportant
|
||||
)
|
||||
|
||||
Target "SourceLink" (fun _ ->
|
||||
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 +122,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 +148,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 +175,7 @@ Target "CreatePackages" DoNothing
|
||||
"Clean"
|
||||
==> "AssemblyInfo"
|
||||
==> "CheckProjects"
|
||||
==> "BuildApp"
|
||||
==> "BuildApp"
|
||||
|
||||
"UnitTests"
|
||||
==> "Default"
|
||||
|
||||
Reference in New Issue
Block a user