Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,6 @@ package-lock.json
# Enable scenarios in integration tests
!integrationtests/scenarios/*/before/**
integrationtests/scenarios/*/before/**/obj

# artifacts
/bin_netcore/
42 changes: 41 additions & 1 deletion Paket.preview3.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.0
Expand All @@ -7,10 +7,22 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Paket.Core", "src\Paket.Cor
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Paket", "src\Paket.preview3\Paket.fsproj", "{6CA5144C-5444-46E8-9B89-86122B5E2D32}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{90759A76-746D-4599-9BCC-E10F8D2E1355}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Paket.Tests", "tests\Paket.Tests.preview3\Paket.Tests.fsproj", "{0156FA92-AF44-4242-B76F-18D0A367A8B2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "integrationtests", "integrationtests", "{C53925AA-95B0-4595-9EE5-E7D3FA1F8E89}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Paket.IntegrationTests", "integrationtests\Paket.IntegrationTests.preview3\Paket.IntegrationTests.fsproj", "{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{779DA2DD-CEA0-4EC4-9DBD-2CF29C2269EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -21,11 +33,39 @@ Global
{6CA5144C-5444-46E8-9B89-86122B5E2D32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CA5144C-5444-46E8-9B89-86122B5E2D32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CA5144C-5444-46E8-9B89-86122B5E2D32}.Release|Any CPU.Build.0 = Release|Any CPU
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|x64.ActiveCfg = Debug|x64
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|x64.Build.0 = Debug|x64
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|x86.ActiveCfg = Debug|x86
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Debug|x86.Build.0 = Debug|x86
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|Any CPU.Build.0 = Release|Any CPU
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|x64.ActiveCfg = Release|x64
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|x64.Build.0 = Release|x64
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|x86.ActiveCfg = Release|x86
{0156FA92-AF44-4242-B76F-18D0A367A8B2}.Release|x86.Build.0 = Release|x86
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|x64.ActiveCfg = Debug|x64
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|x64.Build.0 = Debug|x64
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|x86.ActiveCfg = Debug|x86
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Debug|x86.Build.0 = Debug|x86
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|Any CPU.Build.0 = Release|Any CPU
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|x64.ActiveCfg = Release|x64
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|x64.Build.0 = Release|x64
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|x86.ActiveCfg = Release|x86
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B8685609-2523-42CA-A8D0-921436B8674A}
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0156FA92-AF44-4242-B76F-18D0A367A8B2} = {90759A76-746D-4599-9BCC-E10F8D2E1355}
{BCF3D1A7-724E-4E33-AC88-70984B3CC03A} = {C53925AA-95B0-4595-9EE5-E7D3FA1F8E89}
EndGlobalSection
EndGlobal
16 changes: 6 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ version: 0.0.1.{build}
artifacts:
- path: bin
name: bin
- path: bin_netcore
name: bin_netcore
- path: 'temp\*.nupkg'
type: NuGetPackage
nuget:
account_feed: false
project_feed: true

#environment:
# # these variables are common to all jobs
# #common_var1: value1
#
# matrix:
# # first group
# - SkipIntegrationTests: true
# # second group
# - SkipNuGet: true

environment:
matrix:
- SkipIntegrationTestsNetCore: true
- SkipIntegrationTestsNet: true
88 changes: 56 additions & 32 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@ let dotnetcliVersion = DotNetCli.GetDotNetSDKVersionFromGlobalJson()

let mutable dotnetExePath = "dotnet"

let netcoreFiles = !! "src/**.preview?/*.fsproj" |> Seq.toList

// --------------------------------------------------------------------------------------
// END TODO: The rest of the file includes standard build steps
// --------------------------------------------------------------------------------------

let buildDir = "bin"
let buildDirNetCore = "bin_netcore"
let tempDir = "temp"
let buildMergedDir = buildDir @@ "merged"
let paketFile = buildMergedDir @@ "paket.exe"
Expand Down Expand Up @@ -137,6 +136,7 @@ Target "Clean" (fun _ ->
!! "src/**/bin"
++ "tests/**/bin"
++ buildDir
++ buildDirNetCore
++ tempDir
|> CleanDirs

Expand Down Expand Up @@ -197,42 +197,63 @@ Target "DotnetRestore" (fun _ ->
{ p with
Group = "NetCoreTools" })

netcoreFiles
|> Seq.iter (fun proj ->
DotNetCli.Restore (fun c ->
{ c with
Project = proj
ToolPath = dotnetExePath
})
)
DotNetCli.Restore (fun c ->
{ c with
Project = "Paket.preview3.sln"
ToolPath = dotnetExePath
})
)

Target "DotnetBuild" (fun _ ->
netcoreFiles
|> Seq.iter (fun proj ->
DotNetCli.Build (fun c ->
{ c with
Project = proj
ToolPath = dotnetExePath
AdditionalArgs = [ "/p:SourceLinkCreate=true" ]
})
)
DotNetCli.Build (fun c ->
{ c with
Project = "Paket.preview3.sln"
ToolPath = dotnetExePath
AdditionalArgs = [ "/p:SourceLinkCreate=true" ]
})
)
"Clean" ==> "DotnetRestore" ==> "DotnetBuild"

Target "DotnetPublish" (fun _ ->
DotNetCli.Publish (fun c ->
{ c with
Project = "src/Paket.preview3"
ToolPath = dotnetExePath
Output = FullName (currentDirectory </> buildDirNetCore)
})
)
"Clean" ==> "DotnetBuild" ?=> "DotnetPublish"

Target "DotnetPackage" (fun _ ->
let outPath = FullName (currentDirectory </> tempDir </> "dotnetcore")
CleanDir outPath
netcoreFiles
|> Seq.iter (fun proj ->
DotNetCli.Pack (fun c ->
{ c with
Project = proj
ToolPath = dotnetExePath
AdditionalArgs = [(sprintf "-o \"%s\"" outPath); (sprintf "/p:Version=%s" release.NugetVersion)]
})
)
DotNetCli.Pack (fun c ->
{ c with
Project = "src/Paket.Core.preview3/Paket.Core.fsproj"
ToolPath = dotnetExePath
AdditionalArgs = [(sprintf "-o \"%s\"" outPath); (sprintf "/p:Version=%s" release.NugetVersion)]
})
)

Target "DotnetTest" (fun _ ->
DotNetCli.Test (fun c ->
{ c with
Project = "tests/Paket.Tests.preview3/Paket.Tests.fsproj"
ToolPath = dotnetExePath
})
)

Target "RunIntegrationTestsNetCore" (fun _ ->
// improves the speed of the test-suite by disabling the runtime resolution.
System.Environment.SetEnvironmentVariable("PAKET_DISABLE_RUNTIME_RESOLUTION", "true")
DotNetCli.Test (fun c ->
{ c with
Project = "integrationtests/Paket.IntegrationTests.preview3/Paket.IntegrationTests.fsproj"
ToolPath = dotnetExePath
TimeOut = TimeSpan.FromMinutes 50.
})
)
"Clean" ==> "DotnetPublish" ==> "RunIntegrationTestsNetCore"

// --------------------------------------------------------------------------------------
// Run the unit tests using test runner
Expand Down Expand Up @@ -378,14 +399,16 @@ Target "NuGet" (fun _ ->
if File.Exists(d) then File.Move(d, f))
)

"DotnetPublish" ==> "NuGet"

Target "MergeDotnetCoreIntoNuget" (fun _ ->

let nupkg = tempDir </> sprintf "Paket.Core.%s.nupkg" (release.NugetVersion) |> Path.GetFullPath
let netcoreNupkg = tempDir </> "dotnetcore" </> sprintf "Paket.Core.%s.nupkg" (release.NugetVersion) |> Path.GetFullPath

let runTool = runCmdIn "tools" dotnetExePath

runTool """mergenupkg --source "%s" --other "%s" --framework netstandard1.6 """ nupkg netcoreNupkg
runTool """mergenupkg --source "%s" --other "%s" --framework netstandard2.0 """ nupkg netcoreNupkg
)

Target "PublishNuGet" (fun _ ->
Expand Down Expand Up @@ -605,26 +628,27 @@ Target "All" DoNothing
=?> ("InstallDotNetCore", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("DotnetRestore", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("DotnetBuild", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("DotnetPackage", not <| hasBuildParam "DISABLE_NETCORE")

==> "BuildCore"

"Clean"
==> "AssemblyInfo"
==> "Build"
<=> "BuildCore"
==> "RunTests"
=?> ("DotnetTest", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("GenerateReferenceDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs"))
=?> ("GenerateDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs"))
==> "All"
=?> ("ReleaseDocs",isLocalBuild && not isMono && not (hasBuildParam "SkipDocs"))

"All"
==> "MergePaketTool"
=?> ("RunIntegrationTests", not <| hasBuildParam "SkipIntegrationTests")
=?> ("RunIntegrationTests", not <| (hasBuildParam "SkipIntegrationTests" || hasBuildParam "SkipIntegrationTestsNet"))
=?> ("RunIntegrationTestsNetCore", not <| (hasBuildParam "SkipIntegrationTests" || hasBuildParam "SkipIntegrationTestsNetCore" || hasBuildParam "DISABLE_NETCORE"))
==> "SignAssemblies"
==> "CalculateDownloadHash"
=?> ("NuGet", not <| hasBuildParam "SkipNuGet")
=?> ("DotnetPackage", not <| hasBuildParam "DISABLE_NETCORE" && not <| hasBuildParam "SkipNuGet")
=?> ("MergeDotnetCoreIntoNuget", not <| hasBuildParam "DISABLE_NETCORE" && not <| hasBuildParam "SkipNuGet")
==> "BuildPackage"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<PaketTestsSourcesDir>..\Paket.IntegrationTests</PaketTestsSourcesDir>
<DefineConstants>PAKET_NETCORE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Reference Include="FakeLib">
<HintPath>..\..\packages\build\FAKE\tools\FakeLib.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\paket-files\forki\FsUnit\FsUnit.fs">
<Paket>True</Paket>
<Link>FsUnit.fs</Link>
</Compile>
<Compile Include="$(PaketTestsSourcesDir)\AssemblyInfo.fs" />
<Compile Include="$(PaketTestsSourcesDir)\TestHelper.fs" />
<Compile Include="$(PaketTestsSourcesDir)\InitSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\OutdatedSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\FullGitSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\FrameworkRestrictionsSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\NuGetV3Specs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\UpdatePackageSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\UpdateGroupsSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\AddSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\OutdatedSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\PackSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\InstallSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\RestoreSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\AutoRestoreSpec.fs" />
<Compile Include="$(PaketTestsSourcesDir)\FrameworkRestrictionsSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\HttpSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\PaketCoreSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\BasicResolverSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\ConvertFromNuGetSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\SemVerUpdateSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\ResolverSkipsConflictsFastSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\AutocompleteSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\BindingRedirect.fs" />
<Compile Include="$(PaketTestsSourcesDir)\LoadingScriptGenerationTests.fs" />
<Compile Include="$(PaketTestsSourcesDir)\LocalOverrideSpecs.fs" />
<Compile Include="$(PaketTestsSourcesDir)\SimplifierSpecs.fs" />
<None Include="paket.references" />
</ItemGroup>

<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Paket.Core.preview3\Paket.Core.fsproj" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions integrationtests/Paket.IntegrationTests.preview3/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Program

let [<EntryPoint>] main _ =
0
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ let ``#1182 framework restrictions overwrite each other``() =
lockFile.Contains("framework: winv4.5") |> shouldEqual false

[<Test>]
#if NETCOREAPP2_0
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform("Mono")>] // PATH TOO LONG on Windows...
#endif
let ``#1190 paket add nuget should handle transitive dependencies``() =
paket "add nuget xunit version 2.1.0" "i001190-transitive-dependencies-with-restr" |> ignore
let lockFile = LockFile.LoadFrom(Path.Combine(scenarioTempPath "i001190-transitive-dependencies-with-restr","paket.lock"))
Expand Down
9 changes: 9 additions & 0 deletions integrationtests/Paket.IntegrationTests/InitSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ open System.IO
open System.Diagnostics

[<Test>]
#if PAKET_NETCORE
[<Ignore(".net core paket doesnt init the boostrapper")>]
#endif
let ``#1040 init should download release version of bootstrapper``() =
paket "init" "i001040-init-downloads-bootstrapper" |> ignore
let bootstrapperPath = Path.Combine(scenarioTempPath "i001040-init-downloads-bootstrapper",".paket","paket.exe")
Expand All @@ -18,6 +21,9 @@ let ``#1040 init should download release version of bootstrapper``() =
productVersion.Contains("-") |> shouldEqual false

[<Test>]
#if PAKET_NETCORE
[<Ignore(".net core paket doesnt init the boostrapper")>]
#endif
let ``#1743 empty log file``() =
try
paket "init --log-file" "i001040-init-downloads-bootstrapper" |> ignore
Expand All @@ -26,6 +32,9 @@ let ``#1743 empty log file``() =
| exn when exn.Message.Split('\n').[0].Contains "--log-file" -> ()

[<Test>]
#if PAKET_NETCORE
[<Ignore(".net core paket doesnt init the boostrapper")>]
#endif
let ``#1240 current bootstrapper should work``() =
CleanDir (scenarioTempPath "i001240-bootstrapper")
let paketToolPath = FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.bootstrapper.exe")
Expand Down
8 changes: 8 additions & 0 deletions integrationtests/Paket.IntegrationTests/OutdatedSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@ let ``#183 outdated without params``() =
msg |> shouldContainText "FSharp.Formatting 2.4 ->"

[<Test>]
#if NETCOREAPP2_0
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Mono">] // PATH TOO LONG on Windows...
#endif
let ``#183 outdated --ignore-constraint``() =
let msg = paket "outdated --ignore-constraints" "i000183-outdated-with-special-parameters"
msg.Contains("Newtonsoft.Json 6.0.7 -> 6.0.8") |> shouldEqual false


[<Test>]
#if NETCOREAPP2_0
[<Ignore "PlatformAttribute not supported by netstandard NUnit">]
#else
[<Platform "Mono">] // PATH TOO LONG on Windows...
#endif
let ``#183 outdated --include-prereleases``() =
let msg = paket "outdated --include-prereleases" "i000183-outdated-with-special-parameters"
msg |> shouldContainText "Newtonsoft.Json 6.0.7 ->"
Expand Down
Loading