diff --git a/build.sh b/build.sh index a39274d..9f7850c 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,9 @@ #!/bin/bash -export MONO=mono + +mono .nuget/NuGet.exe install Nuget.Core -OutputDirectory packages -ExcludeVersion if [ ! -e packages/FAKE/tools/FAKE.exe ]; then - mono .nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion + mono .nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion -version "2.18.2" fi if [ ! -e packages/SourceLink.Fake/Tools/Fake.fsx ]; then mono .nuget/NuGet.exe install SourceLink.Fake -OutputDirectory packages -ExcludeVersion diff --git a/build.template b/build.template index 62a9656..9ce0a6c 100644 --- a/build.template +++ b/build.template @@ -2,14 +2,19 @@ // FAKE build script // -------------------------------------------------------------------------------------- +#r @"packages/Nuget.Core/lib/net40-Client/NuGet.Core.dll" #r @"packages/FAKE/tools/FakeLib.dll" -#load "packages/SourceLink.Fake/Tools/Fake.fsx" open Fake open Fake.Git open Fake.AssemblyInfoFile open Fake.ReleaseNotesHelper open System +#if MONO +#else +#load "packages/SourceLink.Fake/Tools/Fake.fsx" open SourceLink +#endif + // -------------------------------------------------------------------------------------- // START TODO: Provide project-specific details below @@ -109,6 +114,8 @@ Target "RunTests" (fun _ -> OutputFile = "TestResults.xml" }) ) +#if MONO +#else // -------------------------------------------------------------------------------------- // SourceLink allows Source Indexing on the PDB generated by the compiler, this allows // the ability to step through the source code of external libraies https://github.com/ctaggart/SourceLink @@ -127,6 +134,7 @@ Target "SourceLink" (fun _ -> Pdbstr.exec proj.OutputFilePdb proj.OutputFilePdbSrcSrv ) ) +#endif // -------------------------------------------------------------------------------------- // Build a NuGet package @@ -188,7 +196,10 @@ Target "All" DoNothing ==> "CleanDocs" ==> "GenerateDocs" ==> "ReleaseDocs" +#if MONO +#else =?> ("SourceLink", Pdbstr.tryFind().IsSome ) +#endif ==> "NuGet" ==> "Release"