From 6e17c89e46968245a1569eedcf95a4e2b96dc4f8 Mon Sep 17 00:00:00 2001 From: Alfonso Garcia-Caro Date: Sat, 27 Oct 2018 11:17:15 +0200 Subject: [PATCH] Bump version to 2.0.8 --- src/dotnet/Fable.Compiler/CLI/Agent.fs | 13 ++++++++++--- src/dotnet/Fable.Compiler/CLI/CLI.Util.fs | 2 +- src/dotnet/Fable.Compiler/Fable.Compiler.fsproj | 4 ++-- src/dotnet/Fable.Compiler/RELEASE_NOTES.md | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/dotnet/Fable.Compiler/CLI/Agent.fs b/src/dotnet/Fable.Compiler/CLI/Agent.fs index 0d9f4a0ace..a8daa6cfd0 100644 --- a/src/dotnet/Fable.Compiler/CLI/Agent.fs +++ b/src/dotnet/Fable.Compiler/CLI/Agent.fs @@ -32,12 +32,19 @@ let tryGetOption name (opts: IDictionary) = | true, value -> Some value | false, _ -> None +let splitVersion (version: string) = + match System.Version.TryParse(version) with + | true, v -> v.Major, v.Minor, v.Revision + | _ -> 0, 0, 0 + let checkFableCoreVersion (checkedProject: FSharpCheckProjectResults) = for ref in checkedProject.ProjectContext.GetReferencedAssemblies() do if ref.SimpleName = "Fable.Core" then - let version = System.Text.RegularExpressions.Regex.Match(ref.QualifiedName, @"Version=(\d+\.\d+)\.\d+") - if version.Groups.[1].Value <> Literals.CORE_VERSION then - failwithf "Fable.Core v%s detected, expecting v%s" version.Groups.[1].Value Literals.CORE_VERSION + let version = System.Text.RegularExpressions.Regex.Match(ref.QualifiedName, @"Version=(\d+\.\d+\.\d+)") + let expectedMajor, expectedMinor, _ = splitVersion Literals.CORE_VERSION + let actualMajor, actualMinor, _ = splitVersion version.Groups.[1].Value + if not(actualMajor = expectedMajor && actualMinor = expectedMinor) then + failwithf "Fable.Core v%i.%i detected, expecting v%i.%i" actualMajor actualMinor expectedMajor expectedMinor // else printfn "Fable.Core version matches" let createProject checker dirtyFiles (prevProject: Project option) (msg: Parser.Message) projFile = diff --git a/src/dotnet/Fable.Compiler/CLI/CLI.Util.fs b/src/dotnet/Fable.Compiler/CLI/CLI.Util.fs index 1465794cb9..fb7812fe13 100644 --- a/src/dotnet/Fable.Compiler/CLI/CLI.Util.fs +++ b/src/dotnet/Fable.Compiler/CLI/CLI.Util.fs @@ -2,7 +2,7 @@ namespace Fable.CLI module Literals = - let [] VERSION = "2.0.7" + let [] VERSION = "2.0.8" let [] CORE_VERSION = "2.0.1" let [] DEFAULT_PORT = 61225 let [] FORCE = "force:" diff --git a/src/dotnet/Fable.Compiler/Fable.Compiler.fsproj b/src/dotnet/Fable.Compiler/Fable.Compiler.fsproj index 6104110402..649107873c 100644 --- a/src/dotnet/Fable.Compiler/Fable.Compiler.fsproj +++ b/src/dotnet/Fable.Compiler/Fable.Compiler.fsproj @@ -2,8 +2,8 @@ Fable: F# to JS Compiler - 2.0.7 - 2.0.7 + 2.0.8 + 2.0.8 Exe DotnetCliTool dotnet-fable diff --git a/src/dotnet/Fable.Compiler/RELEASE_NOTES.md b/src/dotnet/Fable.Compiler/RELEASE_NOTES.md index b449855e96..b77641bb1f 100644 --- a/src/dotnet/Fable.Compiler/RELEASE_NOTES.md +++ b/src/dotnet/Fable.Compiler/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -### 2.0.7 +### 2.0.8 * Implement eprintf and eprintfn @inosik * Fix #1389: Throw proper error when match cases are incomplete @Zaid-Aja