Skip to content

Commit 33d96df

Browse files
committed
fix some build scripts warnings
(cherry picked from commit 0c10798)
1 parent 6755408 commit 33d96df

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

build/scripts/Building.fs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace Scripts
66

77
open System.IO
88

9-
open Paths
109
open Tooling
1110
open Versioning
1211
open Fake.Core
@@ -19,7 +18,7 @@ open System.IO.Compression
1918

2019
module Build =
2120

22-
let Restore() = DotNet.Exec ["restore"; Solution; ] |> ignore
21+
let Restore() = DotNet.Exec ["restore"; Paths.Solution; ] |> ignore
2322

2423
let Compile _ version =
2524
let props =
@@ -32,7 +31,7 @@ module Build =
3231
|> String.concat ";"
3332
|> sprintf "/property:%s"
3433

35-
DotNet.Exec ["build"; Solution; "-c"; "Release"; props] |> ignore
34+
DotNet.Exec ["build"; Paths.Solution; "-c"; "Release"; props] |> ignore
3635

3736
let Pack version =
3837
let props =
@@ -45,19 +44,19 @@ module Build =
4544
|> String.concat ";"
4645
|> sprintf "/p:%s"
4746

48-
DotNet.Exec ["pack"; Solution; "-c"; "Release"; "-o"; Paths.NugetOutput ; props] |> ignore
47+
DotNet.Exec ["pack"; Paths.Solution; "-c"; "Release"; "-o"; Paths.NugetOutput ; props] |> ignore
4948

5049
let Clean isCanary =
5150
printfn "Cleaning known output folders"
5251
Shell.cleanDir Paths.BuildOutput
5352
if isCanary then
54-
DotNet.Exec ["clean"; Solution; "-c"; "Release"; "-v"; "q"] |> ignore
53+
DotNet.Exec ["clean"; Paths.Solution; "-c"; "Release"; "-v"; "q"] |> ignore
5554

5655
let private keyFile = Paths.Keys "keypair.snk"
5756
let private tmp = "build/output/_packages/tmp"
5857

5958
let VersionedPack version =
60-
let packages = Versioning.BuiltArtifacts version
59+
let packages = BuiltArtifacts version
6160
let currentMajorVersion = version.Full.Major
6261

6362
let newId nugetId = sprintf "%s.v%i" nugetId currentMajorVersion

build/scripts/Commandline.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Execution hints can be provided anywhere on the command line
112112

113113
let notWindows =
114114
RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
115-
RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX)
115+
RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
116116

117117
let private buildingOnAzurePipeline = Environment.environVarAsBool "TF_BUILD"
118118

build/scripts/Targets.fs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ namespace Scripts
77
open System
88
open System.IO
99

10-
open Build
11-
open Commandline
1210
open Bullseye
13-
open Octokit
1411
open ProcNet
1512
open Fake.Core
1613

@@ -67,7 +64,7 @@ module Main =
6764

6865
target "version" <| fun _ -> printfn "Artifacts Version: %O" artifactsVersion
6966

70-
target "restore" Restore
67+
target "restore" Build.Restore
7168

7269
target "full-build" <| fun _ -> Build.Compile parsed artifactsVersion
7370

@@ -91,7 +88,7 @@ module Main =
9188

9289
//RELEASE
9390
command "release" releaseChain <| fun _ ->
94-
let outputPath = match parsed.CommandArguments with | SetVersion c -> c.OutputLocation | _ -> None
91+
let outputPath = match parsed.CommandArguments with | Commandline.SetVersion c -> c.OutputLocation | _ -> None
9592
match outputPath with
9693
| None -> printfn "Finished Release Build %O, artifacts available at: %s" artifactsVersion Paths.BuildOutput
9794
| Some path ->

build/scripts/Testing.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module Tests =
4141
let runSettings =
4242
// force the logger section to be cleared so that azure devops can work its magic.
4343
// relies heavily on the original console logger
44-
let prefix = if Commandline.runningOnAzureDevops then ".ci" else ""
44+
let prefix = if runningOnAzureDevops then ".ci" else ""
4545
sprintf "tests/%s.runsettings" prefix
4646

4747
Directory.CreateDirectory Paths.BuildOutput |> ignore

build/scripts/Tooling.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ open ProcNet.Std
1010

1111
module Tooling =
1212

13-
type ExecResult = { ExitCode: int; Output: Std.LineOut seq;}
13+
type ExecResult = { ExitCode: int; Output: LineOut seq;}
1414

1515
let private defaultTimeout = TimeSpan.FromMinutes(5.)
1616

build/scripts/Versioning.fs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
namespace Scripts
66

77
open System
8-
open System.Reflection
9-
open System.Diagnostics
108
open System.IO
11-
open Commandline
129
open Fake.Core
1310
open Fake.IO
1411
open Fake.IO.Globbing.Operators
@@ -59,14 +56,14 @@ module Versioning =
5956
doc_current = doc_current
6057
doc_branch = doc_branch
6158
}
62-
File.WriteAllText("global.json", JsonConvert.SerializeObject(newGlobalJson, Newtonsoft.Json.Formatting.Indented))
59+
File.WriteAllText("global.json", JsonConvert.SerializeObject(newGlobalJson, Formatting.Indented))
6360
printfn "Written (%s) to global.json as the current version will use this version from now on as current in the build" (version.ToString())
6461

6562
let GlobalJsonVersion = parse <| globalJson().version
6663

6764
let private getVersion (args:Commandline.PassedArguments) =
6865
match (args.Target, args.CommandArguments) with
69-
| (_, SetVersion v) ->
66+
| (_, Commandline.SetVersion v) ->
7067
match v.Version with
7168
| v when String.IsNullOrEmpty v -> None
7269
| v -> Some <| parse v

0 commit comments

Comments
 (0)