Skip to content

Commit

Permalink
Merge pull request #2 from forki/core_clr
Browse files Browse the repository at this point in the history
Use FAKE's DotNet CLI helpers
  • Loading branch information
matthid authored Jul 21, 2016
2 parents 019ea75 + 19a4b8e commit aa1b190
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 171 deletions.
21 changes: 17 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#I "packages/build/FAKE/tools"
#r "packages/build/FAKE/tools/FakeLib.dll"
#r @"packages/build/FAKE/tools/Newtonsoft.Json.dll"

open System
open System.IO
Expand Down Expand Up @@ -175,18 +176,29 @@ Target "ReleaseGitHub" (fun _ ->

let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x

Target "SetVersionInProjectJSON" (fun _ ->
!! "./**/project.json"
|> Seq.iter (DotNet.SetVersionInProjectJson release.NugetVersion)
)

Target "Build.NetCore" (fun _ ->
Shell.Exec("dotnet", "restore") |> assertExitCodeZero
Shell.Exec("dotnet", "--verbose pack --configuration Release", "src/Argu") |> assertExitCodeZero
DotNet.Restore id

!! "src/**/project.json"
|> DotNet.Build id
)

Target "RunTests.NetCore" (fun _ ->
Shell.Exec("dotnet", "--verbose run --configuration Release", "tests/Argu.NetCore.Tests") |> assertExitCodeZero
!! "tests/**/project.json"
|> DotNet.Test id
)

let isDotnetSDKInstalled = try Shell.Exec("dotnet", "--version") = 0 with _ -> false
let isDotnetSDKInstalled = DotNet.isInstalled()

Target "Nuget.AddNetCore" (fun _ ->
!! "src/**/project.json"
|> DotNet.Pack id

let nupkg = sprintf "../../bin/Argu.%s.nupkg" (release.NugetVersion)
let netcoreNupkg = sprintf "bin/Release/Argu.%s.nupkg" (release.NugetVersion)

Expand All @@ -205,6 +217,7 @@ Target "Default" DoNothing

"Clean"
==> "AssemblyInfo"
==> "SetVersionInProjectJSON"
==> "Prepare"
==> "Build.Net40"
==> "RunTests"
Expand Down
58 changes: 29 additions & 29 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ NUGET
System.Text.Encoding (>= 4.0.11) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
System.Threading.Tasks (>= 4.0.11) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
System.Linq (4.1) - framework: dnxcore50
System.Collections (>= 4.0.11) - framework: dnxcore50, netstandard10, >= netstandard15
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, >= netstandard15
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Collections (>= 4.0.11) - framework: dnxcore50, netstandard10, >= netstandard16
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, >= netstandard16
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Linq.Expressions (4.1) - framework: dnxcore50
System.Collections (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Globalization (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.IO (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Linq (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Reflection (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
System.Reflection.Emit.ILGeneration (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Reflection.Emit.Lightweight (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Reflection.Extensions (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Reflection.Primitives (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Reflection.TypeExtensions (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Threading (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Collections (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Globalization (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.IO (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Linq (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Reflection (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16
System.Reflection.Emit.ILGeneration (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Reflection.Emit.Lightweight (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Reflection.Extensions (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Reflection.Primitives (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Reflection.TypeExtensions (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Threading (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.ObjectModel (4.0.12) - framework: dnxcore50
System.Collections (>= 4.0.11) - framework: dnxcore50, >= netstandard13
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50, >= netstandard13
Expand Down Expand Up @@ -75,7 +75,7 @@ NUGET
System.Diagnostics.Contracts (>= 4.0.1) - framework: dnxcore50
System.Diagnostics.Debug (>= 4.0.11) - framework: dnxcore50
System.Linq (>= 4.1) - framework: dnxcore50
System.Reflection (>= 4.1) - framework: dnxcore50, netstandard13, >= netstandard15
System.Reflection (>= 4.1) - framework: >= net462, dnxcore50, netstandard13, >= netstandard15
System.Reflection.Primitives (>= 4.0.1) - framework: dnxcore50
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard13, >= netstandard15
Expand All @@ -98,12 +98,12 @@ NUGET
Microsoft.NETCore.Targets (>= 1.0.1) - framework: dnxcore50, netstandard10, >= netstandard13
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, >= netstandard13
System.Text.RegularExpressions (4.1) - framework: dnxcore50
System.Collections (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Globalization (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard15
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard15
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard15
System.Threading (>= 4.0.11) - framework: dnxcore50, >= netstandard15
System.Collections (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Globalization (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Resources.ResourceManager (>= 4.0.1) - framework: dnxcore50, >= netstandard16
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, netstandard13, >= netstandard16
System.Runtime.Extensions (>= 4.1) - framework: dnxcore50, >= netstandard16
System.Threading (>= 4.0.11) - framework: dnxcore50, >= netstandard16
System.Threading (4.0.11) - framework: dnxcore50
System.Runtime (>= 4.1) - framework: dnxcore50, netstandard10, >= netstandard13
System.Threading.Tasks (>= 4.0.11) - framework: dnxcore50, netstandard10, >= netstandard13
Expand Down Expand Up @@ -167,7 +167,7 @@ NUGET
GROUP Build
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.29.2)
FAKE (4.34.5)
FSharp.Compiler.Service (2.0.0.6)
FSharp.Formatting (2.14.4)
FSharp.Compiler.Service (2.0.0.6)
Expand All @@ -185,5 +185,5 @@ NUGET
Microsoft.Net.Http - framework: net10, net11, net20, net30, net35, net40, net40-full
GITHUB
remote: fsharp/FAKE
modules/Octokit/Octokit.fsx (c56456abac6b744c3bb95b217687db19fd19b367)
modules/Octokit/Octokit.fsx (573a4dc3d2be229d55a4935136f393d1f1d683c1)
Octokit (>= 0.20)
92 changes: 46 additions & 46 deletions src/Argu/project.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"version": "3.1.0",
"buildOptions": {
"debugType": "portable",
"compilerName": "fsc",
"version": "3.1.0",
"buildOptions": {
"debugType": "portable",
"compilerName": "fsc",
"define": [
"CORE_CLR"
],
"compile": {
"includeFiles": [
"AssemblyInfo.fs",
"Types.fs",
"Attributes.fs",
"Utils.fs",
"ConfigReaders.fs",
"UnionArgInfo.fs",
"PreCompute.fs",
"UnParsers.fs",
"ParseResults.fs",
"Parsers/Common.fs",
"Parsers/Cli.fs",
"Parsers/KeyValue.fs",
"ArgumentParser.fs"
]
}
},
"tools": {
"dotnet-mergenupkg": "1.0.*",
"dotnet-compile-fsc": {
"version": "1.0.0-preview2-*",
"imports": "dnxcore50"
}
},
"frameworks": {
"netstandard1.6": {
"buildOptions": {
"define": [
"CORE_CLR"
],
"compile": {
"includeFiles": [
"AssemblyInfo.fs",
"Types.fs",
"Attributes.fs",
"Utils.fs",
"ConfigReaders.fs",
"UnionArgInfo.fs",
"PreCompute.fs",
"UnParsers.fs",
"ParseResults.fs",
"Parsers/Common.fs",
"Parsers/Cli.fs",
"Parsers/KeyValue.fs",
"ArgumentParser.fs"
]
}
},
"tools": {
"dotnet-mergenupkg": "1.0.*",
"dotnet-compile-fsc": {
"version": "1.0.0-preview2-*",
"imports": "dnxcore50"
}
},
"frameworks": {
"netstandard1.6": {
"buildOptions": {
"define": [
"NETSTANDARD1_5",
"NETSTANDARD1_6"
]
},
"dependencies": {
"System.Xml.XDocument": "4.0.11",
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629",
"NETStandard.Library": "1.6.0"
}
}
"NETSTANDARD1_5",
"NETSTANDARD1_6"
]
},
"dependencies": {
"System.Xml.XDocument": "4.0.11",
"FSharp.Core": "4.0.1.7-alpha",
"NETStandard.Library": "1.6.0"
}
}
}
}
}
73 changes: 38 additions & 35 deletions tests/Argu.NetCore.Tests/project.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"compilerName": "fsc",
"define": [
"CORE_CLR"
],
"compile": {
"includeFiles": [
"Program.fs"
]
}
},
"tools": {
"dotnet-compile-fsc": {
"version": "1.0.0-preview2-*",
"imports": "dnxcore50"
}
},
"dependencies": {
"Argu": { "version": "*", "target": "project" }
},
"frameworks": {
"netcoreapp1.0" : {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": [
"dnxcore50"
]
"version": "3.1.0",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"compilerName": "fsc",
"define": [
"CORE_CLR"
],
"compile": {
"includeFiles": [
"Program.fs"
]
}
},
"tools": {
"dotnet-compile-fsc": {
"version": "1.0.0-preview2-*",
"imports": "dnxcore50"
}
},
"dependencies": {
"Argu": {
"version": "*",
"target": "project"
}
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": [
"dnxcore50"
]
}
}
}
}
Loading

0 comments on commit aa1b190

Please sign in to comment.