-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from dungpa/fsharp_40
Migrate to F# 4.0
- Loading branch information
Showing
30 changed files
with
277 additions
and
266 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<!-- Enable the restore command to run before builds --> | ||
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages> | ||
<!-- Download Paket.exe if it does not already exist --> | ||
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket> | ||
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath> | ||
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<!-- Paket command --> | ||
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath> | ||
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath> | ||
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand> | ||
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketExePath)</PaketCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand> | ||
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(PaketBootStrapperExePath)</PaketBootStrapperCommand> | ||
<!-- Commands --> | ||
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences> | ||
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences> | ||
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand> | ||
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand> | ||
<!-- We need to ensure packages are restored prior to assembly resolve --> | ||
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn> | ||
</PropertyGroup> | ||
<Target Name="CheckPrerequisites"> | ||
<!-- Raise an error if we're unable to locate paket.exe --> | ||
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" /> | ||
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" /> | ||
</Target> | ||
<Target Name="DownloadPaket"> | ||
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" /> | ||
</Target> | ||
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites"> | ||
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
@echo off | ||
cls | ||
if not exist packages\FAKE\tools\Fake.exe ( | ||
src\.nuget\nuget.exe install FAKE -OutputDirectory packages -ExcludeVersion | ||
.paket\paket.bootstrapper.exe | ||
if errorlevel 1 ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
.paket\paket.exe restore | ||
if errorlevel 1 ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
packages\FAKE\tools\FAKE.exe build.fsx %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
if test "$OS" = "Windows_NT" | ||
then | ||
# use .Net | ||
|
||
if [ ! -e packages/FAKE/tools/FAKE.exe ]; then | ||
mono src/.nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion | ||
fi | ||
.paket/paket.bootstrapper.exe prerelease | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx | ||
.paket/paket.exe restore | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx | ||
else | ||
# use mono | ||
mono .paket/paket.bootstrapper.exe prerelease | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
mono .paket/paket.exe restore | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source https://www.nuget.org/api/v2/ | ||
|
||
nuget FAKE | ||
nuget Nuget.CommandLine | ||
nuget FsCheck.Nunit 1.0.0 framework: >= net45 | ||
nuget FSharp.Compiler.Service 0.0.73 framework: >= net45 | ||
nuget FsUnit 1.3.0.1 framework: >= net45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
NUGET | ||
remote: https://www.nuget.org/api/v2 | ||
specs: | ||
FAKE (3.36.0) | ||
FsCheck (1.0.0) - framework: >= net45 | ||
FsCheck.Nunit (1.0.0) - framework: >= net45 | ||
FsCheck (>= 1.0.0) | ||
NUnit (>= 2.6.3) | ||
NUnit.Runners (>= 2.6.3) | ||
FSharp.Compiler.Service (1.4.0-beta) - framework: >= net45 | ||
FsUnit (1.3.0.1) - framework: >= net45 | ||
NUnit (>= 2.6.3) | ||
NuGet.CommandLine (2.8.5) | ||
NUnit (2.6.3) - framework: >= net45 | ||
NUnit.Runners (2.6.4) |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.