Skip to content

Commit

Permalink
Merge pull request #6 from matthid/fix_legacy_nugets
Browse files Browse the repository at this point in the history
fix legacy packages
  • Loading branch information
matthid authored May 6, 2017
2 parents 2014185 + 5cec894 commit f4207ed
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ on_failure:
- appveyor PushArtifact FAKE.svclog
test: off
artifacts:
- path: build
name: binaries
- path: 'nuget\dotnetcore\*.nupkg'
type: NuGetPackage
- path: 'nuget\*.nupkg'
- path: 'nuget\legacy\*.nupkg'
type: NuGetPackage
- path: 'nuget\dotnetcore\Fake.netcore\*.zip'
type: Zip
32 changes: 19 additions & 13 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ let buildDir = "./build"
let testDir = "./test"
let docsDir = "./docs"
let apidocsDir = "./docs/apidocs/"
let nugetDir = "./nuget"
let nugetDncDir = "./nuget/dotnetcore"
let nugetLegacyDir = "./nuget/legacy"
let reportDir = "./report"
let packagesDir = "./packages"
let buildMergedDir = buildDir </> "merged"
Expand All @@ -111,7 +112,7 @@ Target "Clean" (fun _ ->
++ "src/*/*/obj"
|> CleanDirs

CleanDirs [buildDir; testDir; docsDir; apidocsDir; nugetDir; reportDir])
CleanDirs [buildDir; testDir; docsDir; apidocsDir; nugetDncDir; nugetLegacyDir; reportDir])

Target "RenameFSharpCompilerService" (fun _ ->
for packDir in ["FSharp.Compiler.Service";"netcore"</>"FSharp.Compiler.Service"] do
Expand Down Expand Up @@ -458,9 +459,9 @@ Target "CreateNuGet" (fun _ ->
Project = package.Project + ".x64" }

for package,description in packages do
let nugetDocsDir = nugetDir @@ "docs"
let nugetToolsDir = nugetDir @@ "tools"
let nugetLibDir = nugetDir @@ "lib"
let nugetDocsDir = nugetLegacyDir @@ "docs"
let nugetToolsDir = nugetLegacyDir @@ "tools"
let nugetLibDir = nugetLegacyDir @@ "lib"
let nugetLib451Dir = nugetLibDir @@ "net451"

CleanDir nugetDocsDir
Expand Down Expand Up @@ -499,7 +500,8 @@ Target "CreateNuGet" (fun _ ->
Project = package
Description = description
Version = release.NugetVersion
OutputPath = nugetDir
OutputPath = nugetLegacyDir
WorkingDir = nugetLegacyDir
Summary = projectSummary
ReleaseNotes = release.Notes |> toLines
Dependencies =
Expand Down Expand Up @@ -557,7 +559,7 @@ Target "DotnetRestore" (fun _ ->
// Copy nupkgs to nuget/dotnetcore
!! "lib/nupgks/**/*.nupkg"
|> Seq.iter (fun file ->
let dir = nugetDir @@ "dotnetcore"
let dir = nugetDncDir //@@ "dotnetcore"
ensureDirectory dir
File.Copy(file, dir @@ Path.GetFileName file, true))

Expand All @@ -575,23 +577,23 @@ let runtimes =
[ "win7-x86"; "win7-x64"; "osx.10.11-x64"; "ubuntu.14.04-x64"; "ubuntu.16.04-x64" ]

Target "DotnetPackage" (fun _ ->
let nugetDir = System.IO.Path.GetFullPath nugetDir
let nugetDir = System.IO.Path.GetFullPath nugetDncDir

setEnvironVar "Version" release.NugetVersion

// dotnet pack
DotnetPack (fun c ->
{ c with
Configuration = Release
OutputPath = Some (nugetDir @@ "dotnetcore")
OutputPath = Some nugetDir
}) "src/Fake-netcore.sln"
//netCoreProjs
//-- "src/app/Fake.netcore/Fake.netcore.fsproj"
//|> Seq.iter(fun proj ->
// DotnetPack (fun c ->
// { c with
// Configuration = Release
// OutputPath = Some (nugetDir @@ "dotnetcore")
// OutputPath = Some (nugetDir)
// }) proj
//)

Expand All @@ -615,7 +617,7 @@ Target "DotnetPackage" (fun _ ->
| None -> "current", info.RID

DotnetRestore (fun c -> {c with Runtime = Some runtime}) proj
let outDir = nugetDir @@ "dotnetcore" @@ projName @@ runtimeName
let outDir = nugetDir @@ projName @@ runtimeName
DotnetPublish (fun c ->
{ c with
Runtime = Some runtime
Expand All @@ -634,7 +636,7 @@ Target "DotnetPackage" (fun _ ->
let oldContent = File.ReadAllText netcoreFsproj
try
// File.WriteAllText(netcoreJson, newContent)
let outDir = nugetDir @@ "dotnetcore" @@ "Fake.netcore" @@ "portable"
let outDir = nugetDir @@ "Fake.netcore" @@ "portable"
DotnetPublish (fun c ->
{ c with
Framework = Some "netcoreapp1.0"
Expand Down Expand Up @@ -790,7 +792,11 @@ Target "PublishNuget" (fun _ ->
Paket.Push(fun p ->
{ p with
DegreeOfParallelism = 2
WorkingDir = nugetDir })
WorkingDir = nugetLegacyDir })
Paket.Push(fun p ->
{ p with
DegreeOfParallelism = 2
WorkingDir = nugetDncDir })
#else
printfn "We don't currently have Paket on dotnetcore."
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/app/FAKE/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ open System.Runtime.InteropServices
[<assembly: AssemblyVersionAttribute("5.0.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.0.0")>]
[<assembly: AssemblyFileVersionAttribute("5.0.0")>]

do ()

module internal AssemblyVersionInformation =
Expand All @@ -18,4 +17,4 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyProduct = "FAKE - F# Make"
let [<Literal>] AssemblyVersion = "5.0.0"
let [<Literal>] AssemblyInformationalVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
2 changes: 1 addition & 1 deletion src/app/Fake.SQL/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyProduct = "FAKE - F# Make"
let [<Literal>] AssemblyVersion = "5.0.0"
let [<Literal>] AssemblyInformationalVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
2 changes: 1 addition & 1 deletion src/deploy.web/Fake.Deploy.Web/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ module internal AssemblyVersionInformation =
let [<Literal>] AssemblyProduct = "FAKE - F# Make"
let [<Literal>] AssemblyVersion = "5.0.0"
let [<Literal>] AssemblyInformationalVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"
let [<Literal>] AssemblyFileVersion = "5.0.0"

0 comments on commit f4207ed

Please sign in to comment.