Skip to content

Commit

Permalink
Merge pull request #288 from tpetricek/paket
Browse files Browse the repository at this point in the history
Completing Paket conversion!
  • Loading branch information
tpetricek committed Jan 14, 2015
2 parents 4885eb6 + 993487f commit 414b38b
Show file tree
Hide file tree
Showing 81 changed files with 1,041 additions and 500 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ tests/PerformanceTools/Deedle.PerfTest.Core/bin
tests/PerformanceTools/Deedle.PerfTest.Runner/obj
tests/PerformanceTools/Deedle.PerfTest.Runner/bin
tests/PerformanceTools/Deedle.PerfTest/obj
tests/PerformanceTools/Deedle.PerfTest/bin
tests/PerformanceTools/Deedle.PerfTest/bin
.paket/paket.exe
6 changes: 0 additions & 6 deletions .nuget/NuGet.Config

This file was deleted.

Binary file removed .nuget/NuGet.exe
Binary file not shown.
136 changes: 0 additions & 136 deletions .nuget/NuGet.targets

This file was deleted.

Binary file added .paket/paket.bootstrapper.exe
Binary file not shown.
38 changes: 38 additions & 0 deletions .paket/paket.targets
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)" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" />
</Target>
</Project>
8 changes: 7 additions & 1 deletion Deedle.Core.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{1D865FE1-0F3D-4F98-BBEC-1D03B8A00931}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Deedle.Tests", "tests\Deedle.Tests\Deedle.Tests.fsproj", "{484A96E6-D217-47EE-974C-5D7B3CFB401E}"
ProjectSection(ProjectDependencies) = postProject
{22729065-4C30-4E43-A63F-4F3338A03878} = {22729065-4C30-4E43-A63F-4F3338A03878}
Expand All @@ -27,6 +32,7 @@ EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Deedle.PerfTests", "tests\Deedle.PerfTests\Deedle.PerfTests.fsproj", "{0275C56B-9A00-4578-A826-A6CF1F089086}"
ProjectSection(ProjectDependencies) = postProject
{D1E7603A-AA82-4517-8605-360DC708B0E9} = {D1E7603A-AA82-4517-8605-360DC708B0E9}
{22729065-4C30-4E43-A63F-4F3338A03878} = {22729065-4C30-4E43-A63F-4F3338A03878}
{371F8CE6-B031-4589-843F-583FE9180948} = {371F8CE6-B031-4589-843F-583FE9180948}
EndProjectSection
EndProject
Expand Down
10 changes: 4 additions & 6 deletions Deedle.Tests.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{6D802F6C-A258-4F6B-B1E4-03B24D319126}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{ACC11088-D082-4141-BBA5-B80209449475}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Deedle.Tests", "tests\Deedle.Tests\Deedle.Tests.fsproj", "{484A96E6-D217-47EE-974C-5D7B3CFB401E}"
Expand Down
12 changes: 8 additions & 4 deletions Deedle.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{B003806F-9C76-4BE6-B3EB-54102529E4FC}"
ProjectSection(SolutionItems) = preProject
paket.dependencies = paket.dependencies
paket.lock = paket.lock
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Deedle", "src\Deedle\Deedle.fsproj", "{22729065-4C30-4E43-A63F-4F3338A03878}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{245F1283-32FA-4B38-AC76-448B8AE5F7AC}"
Expand Down Expand Up @@ -42,7 +47,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{C45F5ABF
ProjectSection(SolutionItems) = preProject
docs\tools\formatters.fsx = docs\tools\formatters.fsx
docs\tools\generate.fsx = docs\tools\generate.fsx
docs\tools\packages.config = docs\tools\packages.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{839C977B-55D4-4EFC-8B81-290357C836D3}"
Expand Down Expand Up @@ -79,7 +83,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{8BD8876A-28FC-4B7D-89E4-09AC07794D0E} = {245F1283-32FA-4B38-AC76-448B8AE5F7AC}
{C45F5ABF-7BCD-4C3A-BD51-81E0769E0F29} = {245F1283-32FA-4B38-AC76-448B8AE5F7AC}
{1700F933-C7B2-48E6-80F3-E1C1B677BA6D} = {245F1283-32FA-4B38-AC76-448B8AE5F7AC}
{839C977B-55D4-4EFC-8B81-290357C836D3} = {C45F5ABF-7BCD-4C3A-BD51-81E0769E0F29}
{1700F933-C7B2-48E6-80F3-E1C1B677BA6D} = {245F1283-32FA-4B38-AC76-448B8AE5F7AC}
EndGlobalSection
EndGlobal
13 changes: 12 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
@echo off
.nuget\nuget.exe install FAKE -OutputDirectory packages -ExcludeVersion
cls

.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 %*
11 changes: 1 addition & 10 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ Target "UpdateFsxVersions" (fun _ ->
)

// --------------------------------------------------------------------------------------
// Clean build results & restore NuGet packages

Target "RestorePackages" (fun _ ->
!! "./**/packages.config"
|> Seq.iter (RestorePackage (fun p -> { p with ToolPath = "./.nuget/NuGet.exe" }))
)
// Clean build results

Target "Clean" (fun _ ->
CleanDirs ["bin"; "temp" ]
Expand Down Expand Up @@ -116,14 +111,11 @@ Target "BuildCore" (fun _ ->
// Run the unit tests using test runner & kill test runner when complete

Target "RunTests" (fun _ ->
let nunitVersion = GetPackageVersion "packages" "NUnit.Runners"
let nunitPath = sprintf "packages/NUnit.Runners.%s/Tools" nunitVersion
ActivateFinalTarget "CloseTestRunner"

!! "tests/Deedle.*Tests/bin/Release/Deedle*Tests*.dll"
|> NUnit (fun p ->
{ p with
ToolPath = nunitPath
DisableShadowCopy = true
TimeOut = TimeSpan.FromMinutes 20.
OutputFile = "TestResults.xml" })
Expand Down Expand Up @@ -223,7 +215,6 @@ Target "All" DoNothing
Target "AllCore" DoNothing

"Clean"
==> "RestorePackages"
==> "UpdateFsxVersions"
==> "AssemblyInfo"
==> "Build"
Expand Down
32 changes: 27 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,32 @@
if test "$OS" = "Windows_NT"
then
# use .Net
.nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
packages/FAKE/tools/FAKE.exe build.fsx $@

.paket/paket.bootstrapper.exe
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi

.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 .nuget/NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi
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
4 changes: 2 additions & 2 deletions docs/content/frame.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(*** hide ***)
#I "../../packages/FSharp.Data.2.0.14/lib/net40"
(*** hide ***)
#I "../../packages/FSharp.Data/lib/net40"
#r "FSharp.Data.dll"
ignore <| FSharp.Data.WorldBankData.GetDataContext() // Force fsi to load F# Data (required on Mono)

Expand Down
Loading

0 comments on commit 414b38b

Please sign in to comment.