diff --git a/build.fsx b/build.fsx index 08e1ef4..d1c0faa 100644 --- a/build.fsx +++ b/build.fsx @@ -90,7 +90,8 @@ Target "AssemblyInfo" (fun _ -> Attribute.Description summary Attribute.Version release.AssemblyVersion Attribute.FileVersion release.AssemblyVersion - Attribute.InternalsVisibleTo "Projekt.Tests" ] + Attribute.InternalsVisibleTo "Projekt.Tests" + Attribute.Company "fsprojects" ] let getProjectDetails projectPath = let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) diff --git a/paket.dependencies b/paket.dependencies index 539c6d6..33d9802 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -6,6 +6,6 @@ nuget NUnit nuget NUnit.Runners nuget FAKE nuget SourceLink.Fake -nuget UnionArgParser +nuget CommandLineParser prerelease github fsharp/FAKE modules/Octokit/Octokit.fsx \ No newline at end of file diff --git a/paket.lock b/paket.lock index 2ebbbf7..6317280 100644 --- a/paket.lock +++ b/paket.lock @@ -1,6 +1,7 @@ NUGET remote: https://nuget.org/api/v2 specs: + CommandLineParser (2.0.223-beta) FAKE (3.35.2) FSharp.Compiler.Service (0.0.90) FSharp.Formatting (2.9.9) @@ -21,9 +22,8 @@ NUGET Octokit (0.13.0) Microsoft.Net.Http SourceLink.Fake (0.5.0) - UnionArgParser (0.8.7) GITHUB remote: fsharp/FAKE specs: - modules/Octokit/Octokit.fsx (38dcc9d8c61d6868601fe848d8eff765e74935f0) + modules/Octokit/Octokit.fsx (f8684a9a3ccd1e0e78b77925a2aa2c259f6787dc) Octokit \ No newline at end of file diff --git a/src/Projekt/Args.fs b/src/Projekt/Args.fs index 197e693..bcb4515 100644 --- a/src/Projekt/Args.fs +++ b/src/Projekt/Args.fs @@ -1,111 +1,113 @@ module Projekt.Args open Projekt.Types -open System.IO -open Nessos.UnionArgParser -type private Args = - | Template of string - | [] FrameworkVersion of string - | Organisation of string - | Direction of string - | Repeat of int - | Link of string - | Compile of bool -with - interface IArgParserTemplate with - member s.Usage = - match s with - | Template _ -> "init -- specify the template (library|console) [default: library]" - | Direction _ -> "movefile -- specify the direction (down|up)" - | Repeat _ -> "movefile -- specify the distance [default: 1]" - | FrameworkVersion _ -> "init -- specify the framework version (4.0|4.5|4.5.1) [default: 4.5]" - | Organisation _ -> "init -- specify the organisation" - | Link _ -> "addfile -- specify an optional Link attribute" - | Compile _ -> "addfile -- should the file be compiled or not [default: true]" +module Args = + open CommandLine + open CommandLine.Text -let private templateArg (res : ArgParseResults) = - match res.TryGetResult(<@ Template @>) with - | Some (ToLower "console") -> Console - | Some (ToLower "library") -> Library - | None -> Library - | _ -> failwith "invalid template argument specified" + [] + type InitOptions = + { [] Path : string + [] Template : string + [] FrameworkVersion : string + [