-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
104 additions
and
501 deletions.
There are no files selected for viewing
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
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
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,36 @@ | ||
#!/bin/dotnet fsi | ||
|
||
#r "nuget: Fake.Core.Process" | ||
#r "nuget: Fake.DotNet.Cli" | ||
|
||
open Fake.Core | ||
open Fake.DotNet | ||
|
||
let buildDir = "./build/" | ||
|
||
let isNullOrWhiteSpace = System.String.IsNullOrWhiteSpace | ||
|
||
let exec cmd args dir = | ||
let proc = | ||
CreateProcess.fromRawCommandLine cmd args | ||
|> CreateProcess.ensureExitCodeWithMessage (sprintf "Error while running '%s' with args: %s" cmd args) | ||
|
||
(if isNullOrWhiteSpace dir then | ||
proc | ||
else | ||
proc |> CreateProcess.withWorkingDirectory dir) | ||
|> Proc.run | ||
|> ignore | ||
|
||
let build () = | ||
DotNet.build | ||
(fun p -> | ||
{ p with | ||
Configuration = DotNet.BuildConfiguration.Release | ||
OutputPath = Some buildDir }) | ||
"TypedPersistence.sln" | ||
|
||
let docs () = exec "dotnet" @"fornax build" "docs" | ||
|
||
build () | ||
docs () |
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,65 @@ | ||
#!/bin/dotnet fsi | ||
#r "nuget: Fake.DotNet.Cli" | ||
#r "nuget: Fake.Core.ReleaseNotes" | ||
|
||
open Fake.Core | ||
open Fake.DotNet | ||
open System.IO | ||
|
||
let project = "TypedPersistence" | ||
|
||
let summary = | ||
"Simple library which should simplify saving and loading files" | ||
|
||
let authors = "NicoVIII" | ||
let tags = "Persistence,Typesafety,F#" | ||
let copyright = "" | ||
|
||
let gitOwner = "NicoVIII" | ||
let gitName = project | ||
let gitHome = "https://github.com/" + gitOwner | ||
let gitUrl = gitHome + "/" + gitName | ||
|
||
let nugetDir = "./out/" | ||
|
||
let changelogFilename = "CHANGELOG.md" | ||
let changelog = Changelog.load changelogFilename | ||
let latestEntry = changelog.LatestEntry | ||
|
||
let nugetVersion = latestEntry.NuGetVersion | ||
|
||
let packageReleaseNotes = | ||
sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl latestEntry.NuGetVersion | ||
|
||
let pack () = | ||
let properties = | ||
[ ("Version", nugetVersion) | ||
("Authors", authors) | ||
("PackageProjectUrl", gitUrl) | ||
("PackageTags", tags) | ||
("RepositoryType", "git") | ||
("RepositoryUrl", gitUrl) | ||
("PackageLicenseUrl", gitUrl + "/LICENSE") | ||
("Copyright", copyright) | ||
("PackageReleaseNotes", packageReleaseNotes) | ||
("PackageDescription", summary) | ||
("EnableSourceLink", "true") ] | ||
|
||
DotNet.pack | ||
(fun p -> | ||
{ p with | ||
Configuration = DotNet.BuildConfiguration.Release | ||
OutputPath = Some nugetDir | ||
MSBuildParams = | ||
{ p.MSBuildParams with | ||
Properties = properties } }) | ||
"TypedPersistence.sln" | ||
|
||
let removeTests () = | ||
Directory.GetFiles nugetDir | ||
|> List.ofArray | ||
|> List.filter (fun name -> name.Contains "UnitTests") | ||
|> List.iter File.Delete | ||
|
||
pack () | ||
removeTests () |
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.