Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bcc3148

Browse files
committedApr 1, 2019
nuget.exe now pulled in though NuGet
1 parent 189b256 commit bcc3148

File tree

5 files changed

+5
-107
lines changed

5 files changed

+5
-107
lines changed
 

‎build/scripts/Tooling.fs

+1-33
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
namespace Scripts
22

33
open System
4-
open System.IO
5-
open System.Net
64
open ProcNet
75
open Fake.IO.Globbing.Operators
86
open ProcNet.Std
@@ -47,38 +45,8 @@ module Tooling =
4745
member this.ExecIn workingDirectory arguments = this.ExecInWithTimeout workingDirectory arguments timeout
4846
member this.Exec arguments = this.ExecWithTimeout arguments timeout
4947

50-
let nugetFile =
51-
let targetLocation = "build/tools/nuget/nuget.exe"
52-
if (not (File.Exists targetLocation))
53-
then
54-
printfn "Nuget not found at %s. Downloading now" targetLocation
55-
let url = "http://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
56-
Directory.CreateDirectory("build/tools/nuget") |> ignore
57-
use webClient = new WebClient()
58-
webClient.DownloadFile(url, targetLocation)
59-
printfn "nuget downloaded"
60-
targetLocation
61-
62-
let Nuget = BuildTooling(None, nugetFile)
48+
let Nuget = BuildTooling(None, "build/scripts/bin/Release/netcoreapp2.2/nuget.exe")
6349
let ILRepack = BuildTooling(None, "build/scripts/bin/Release/netcoreapp2.2/ILRepack.exe")
6450
let DotNet = BuildTooling(Some <| TimeSpan.FromMinutes(5.), "dotnet")
6551

66-
type DotTraceTool = {
67-
Name:string;
68-
Download:string;
69-
TargetDir:string;
70-
}
71-
72-
type DiffTooling(exe) =
73-
let installPath = @"C:\Program Files (x86)\Progress\JustAssembly\Libraries"
74-
let downloadPage = "https://www.telerik.com/download-trial-file/v2/justassembly"
75-
let toolPath = Path.Combine(installPath,exe)
76-
77-
member this.Exec arguments =
78-
if (Directory.Exists installPath |> not) then
79-
failwith (sprintf "JustAssembly is not installed in the default location %s. Download and install from %s" installPath downloadPage)
80-
81-
execInWithTimeout defaultTimeout (Some ".") toolPath arguments
82-
83-
let JustAssembly = DiffTooling("JustAssembly.CommandLineTool.exe")
8452

‎build/scripts/scripts.fsproj

+4-5
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,18 @@
7373
<PackageReference Include="Fake.IO.Zip" Version="5.12.6" />
7474
<PackageReference Include="FSharp.Data" Version="3.0.1" />
7575
<PackageReference Include="FSharp.Data.TypeProviders" Version="5.0.0.6" />
76-
<PackageReference Include="ILRepack" Version="2.1.0-beta1" GeneratePathProperty="true" />
76+
<PackageReference Include="ILRepack" Version="2.1.0-beta1" />
77+
<PackageReference Include="NuGet.CommandLine" Version="4.9.4" />
7778
<PackageReference Include="Octokit" Version="0.32.0" />
7879
<PackageReference Include="Proc" Version="0.4.3" />
7980

80-
8181
<DotNetCliToolReference Include="dotnet-assembly-rewriter" Version="1.0.0-alpha20190401T093210" />
8282
<DotNetCliToolReference Include="dotnet-assembly-differ" Version="1.0.0-alpha20190401T104011" />
8383

84-
<!-- <PackageReference Include="assembly-rewriter" Version="1.0.0-alpha20181126T140416" />-->
85-
<!-- <PackageReference Include="assembly-differ" Version="1.0.0-alpha20181126T222017" />-->
8684
</ItemGroup>
87-
<Target Name="CopyILRepack" AfterTargets="Build">
85+
<Target Name="CopyToolPackages" AfterTargets="Build">
8886
<Copy SourceFiles="$(PkgILRepack)\tools\ILRepack.exe" DestinationFolder="$(OutDir)" />
87+
<Copy SourceFiles="$(PkgNuGet_CommandLine)\tools\nuget.exe" DestinationFolder="$(OutDir)" />
8988
</Target>
9089

9190
</Project>

‎build/targets/Program.cs

-55
This file was deleted.

‎build/targets/targets.csproj

-14
This file was deleted.

‎build/tools/ilmerge/mscorsn.dll

-25.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.