Skip to content

Commit

Permalink
Improve packing
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoVIII committed May 17, 2021
1 parent f742f41 commit d054b18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"paket": {
"version": "6.0.0-beta4",
"version": "6.0.0-rc001",
"commands": [
"paket"
]
Expand Down
18 changes: 7 additions & 11 deletions pack.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@

open Fake.Core
open Fake.DotNet
open System.IO

let project = "TypedPersistence"
let submodules = [ "Core"; "Json" ]

let summary =
"Simple library which should simplify saving and loading files"

let authors = "NicoVIII"
let tags = "Persistence,Typesafety,F#"
let copyright = ""
let license = "MIT"

let gitOwner = "NicoVIII"
let gitName = project
Expand All @@ -31,15 +32,15 @@ let nugetVersion = latestEntry.NuGetVersion
let packageReleaseNotes =
sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl latestEntry.NuGetVersion

let pack () =
let pack submodule =
let properties =
[ ("Version", nugetVersion)
("Authors", authors)
("PackageProjectUrl", gitUrl)
("PackageTags", tags)
("RepositoryType", "git")
("RepositoryUrl", gitUrl)
("PackageLicenseUrl", gitUrl + "/LICENSE")
("PackageLicenseExpression", license)
("Copyright", copyright)
("PackageReleaseNotes", packageReleaseNotes)
("PackageDescription", summary)
Expand All @@ -53,13 +54,8 @@ let pack () =
MSBuildParams =
{ p.MSBuildParams with
Properties = properties } })
"TypedPersistence.sln"
$"src/{project}/{submodule}/{project}.{submodule}.fsproj"

let removeTests () =
Directory.GetFiles nugetDir
|> List.ofArray
|> List.filter (fun name -> name.Contains "UnitTests")
|> List.iter File.Delete
let packAll () = List.iter pack submodules

pack ()
removeTests ()
packAll ()
1 change: 1 addition & 0 deletions src/TypedPersistence/Core/TypedPersistence.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>NicoVIII.TypedPersistence.Core</PackageId>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/TypedPersistence/Json/TypedPersistence.Json.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>NicoVIII.TypedPersistence.Json</PackageId>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit d054b18

Please sign in to comment.