MCC/b2uploader: b2uploader - backup to server - SVN.BY: Go Git Service

b2uploader - backup to server

build.fsx 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //include fake lib
  2. #r @"tools\FAKE\tools\Fakelib.dll"
  3. open Fake
  4. open System
  5. open Fake.AssemblyInfoFile
  6. let buildDir = @".\build"
  7. let deployDir = @".\deploy"
  8. let date = DateTime.UtcNow
  9. let version = String.Format("{0}.{1}.{2}.{3:0.#}", date.Year, date.Month, date.Day, date.TimeOfDay.TotalMinutes.ToString("F0"))
  10. let copyright = "TIernan OToole 2016"
  11. let productName = "B2 Uploader"
  12. let companyName = "Tiernan OToole"
  13. Target "SetAssemblyInfo" (fun _ ->
  14. CreateCSharpAssemblyInfo "B2Classes/Properties/AssemblyInfo.cs"
  15. [Attribute.Title "B2Classes"
  16. Attribute.Guid "fe353639-3b33-44de-9147-45b63818d8a7"
  17. Attribute.Product productName
  18. Attribute.Company companyName
  19. Attribute.Copyright copyright
  20. Attribute.Version version
  21. Attribute.FileVersion version
  22. ]
  23. CreateCSharpAssemblyInfo "B2Uploader/Properties/AssemblyInfo.cs"
  24. [Attribute.Title "B2Uploader"
  25. Attribute.Guid "a5d41169-c2ee-4b5e-a2d8-b63e485597a6"
  26. Attribute.Product productName
  27. Attribute.Company companyName
  28. Attribute.Copyright copyright
  29. Attribute.Version version
  30. Attribute.FileVersion version
  31. ]
  32. )
  33. RestorePackages()
  34. Target "Clean" (fun _ ->
  35. CleanDir buildDir
  36. )
  37. Target "Classes" (fun _ ->
  38. !! @"B2Classes\B2Classes.csproj"
  39. |> MSBuildRelease buildDir "Build"
  40. |> Log "AppBuild-Output: "
  41. )
  42. Target "Uploader" (fun _ ->
  43. !! @"B2Uploader\B2Uploader.csproj"
  44. |> MSBuildRelease buildDir "Build"
  45. |> Log "AppBuild-Output: "
  46. )
  47. Target "Zip" (fun _ ->
  48. !! (buildDir + "\**\*.*")
  49. -- "*.zip"
  50. |> Zip buildDir (deployDir + "\B2Uploader." + version + ".zip")
  51. )
  52. "Clean"
  53. ==> "SetAssemblyInfo"
  54. ==> "Classes"
  55. ==> "Uploader"
  56. ==> "Zip"
  57. RunTargetOrDefault "Zip"