Skip to content

Commit

Permalink
tidied up build, added release notes, prep for release
Browse files Browse the repository at this point in the history
  • Loading branch information
samritchie committed May 26, 2020
1 parent 57faf18 commit 6fd765b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 53 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/docs.yml

This file was deleted.

5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 0.8.1-beta
* Replace deprecated AWS ProfileManager usage
* Bumped test project netcoreapp version to 3.1
* Fixed 'Invalid UpdateExpression' exception for precomputed Map.remove operations (#20)

### 0.8.0-beta
* Move to netstandard2.0.

Expand Down
35 changes: 19 additions & 16 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let gitHome = "https://github.com/" + gitOwner

let buildDir = "./build/"
let nugetDir = "./out/"


System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
let release = ReleaseNotes.parse (System.IO.File.ReadAllLines "RELEASE_NOTES.md")
Expand Down Expand Up @@ -70,7 +70,7 @@ Target.create "AssemblyInfo" (fun _ ->
AssemblyInfo.InternalsVisibleTo (projectName + ".Tests")
]

let getProjectDetails projectPath =
let getProjectDetails (projectPath : string) =
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
( projectPath,
projectName,
Expand Down Expand Up @@ -124,7 +124,15 @@ Target.create "Pack" (fun _ ->
{ p with
Configuration = DotNet.BuildConfiguration.Release
OutputPath = Some nugetDir
MSBuildParams = { p.MSBuildParams with Properties = [("Version", release.NugetVersion); ("PackageReleaseNotes", String.concat "\n" release.Notes)]}
MSBuildParams = { p.MSBuildParams with
Properties =
[
("Version", release.NugetVersion)
("PackageReleaseNotes", String.concat "\n" release.Notes)
// ("IncludeSymbols", "true")
// ("SymbolPackageFormat", "snupkg") // https://github.com/fsprojects/Paket/issues/3685
]
}
}
) "FSharp.AWS.DynamoDB.sln"
)
Expand All @@ -145,17 +153,12 @@ Target.create "ReleaseGitHub" (fun _ ->
Git.Branches.pushTag "" remote release.NugetVersion

let client =
let user =
match getBuildParam "github-user" with
| s when not (isNullOrWhiteSpace s) -> s
| _ -> UserInput.getUserInput "Username: "
let pw =
match getBuildParam "github-pw" with
| s when not (isNullOrWhiteSpace s) -> s
| _ -> UserInput.getUserPassword "Password: "

// Git.createClient user pw
GitHub.createClient user pw
let token =
match getBuildParam "GITHUB_TOKEN" with
| s when not (isNullOrWhiteSpace s) -> s
| _ -> failwith "please set the GITHUB_TOKEN environment variable to a github personal access token with repo access."

GitHub.createClientWithToken token
let files = !! (nugetDir </> "*.nupkg")

// release on github
Expand All @@ -164,13 +167,13 @@ Target.create "ReleaseGitHub" (fun _ ->
|> GitHub.draftNewRelease gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
(cl,files)
||> Seq.fold (fun acc e -> acc |> GitHub.uploadFile e)
|> GitHub.publishDraft//releaseDraft
|> GitHub.publishDraft
|> Async.RunSynchronously
)

Target.create "Push" (fun _ ->
let key =
match getBuildParam "nuget-key" with
match getBuildParam "NUGET_KEY" with
| s when not (isNullOrWhiteSpace s) -> s
| _ -> UserInput.getUserPassword "NuGet Key: "
Paket.push (fun p -> { p with WorkingDir = nugetDir; ApiKey = key }))
Expand Down
8 changes: 4 additions & 4 deletions src/FSharp.AWS.DynamoDB/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ open System.Runtime.CompilerServices
[<assembly: AssemblyTitleAttribute("FSharp.AWS.DynamoDB")>]
[<assembly: AssemblyProductAttribute("FSharp.AWS.DynamoDB")>]
[<assembly: AssemblyDescriptionAttribute("An F# wrapper over the standard Amazon.DynamoDB library")>]
[<assembly: AssemblyVersionAttribute("0.8.0")>]
[<assembly: AssemblyFileVersionAttribute("0.8.0")>]
[<assembly: AssemblyVersionAttribute("0.8.1")>]
[<assembly: AssemblyFileVersionAttribute("0.8.1")>]
[<assembly: InternalsVisibleToAttribute("FSharp.AWS.DynamoDB.Tests")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.AWS.DynamoDB"
let [<Literal>] AssemblyProduct = "FSharp.AWS.DynamoDB"
let [<Literal>] AssemblyDescription = "An F# wrapper over the standard Amazon.DynamoDB library"
let [<Literal>] AssemblyVersion = "0.8.0"
let [<Literal>] AssemblyFileVersion = "0.8.0"
let [<Literal>] AssemblyVersion = "0.8.1"
let [<Literal>] AssemblyFileVersion = "0.8.1"
let [<Literal>] InternalsVisibleTo = "FSharp.AWS.DynamoDB.Tests"
4 changes: 2 additions & 2 deletions src/FSharp.AWS.DynamoDB/FSharp.AWS.DynamoDB.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<Company />
<Copyright>Copyright 2016</Copyright>
<Product />
<PackageLicenseUrl>https://github.com/eiriktsarpalis/FSharp.AWS.DynamoDB/blob/master/License.md</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/eiriktsarpalis/FSharp.AWS.DynamoDB</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/fsprojects/FSharp.AWS.DynamoDB/blob/master/License.md</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/fsprojects/FSharp.AWS.DynamoDB</PackageProjectUrl>
<PackageIconUrl>https://avatars0.githubusercontent.com/u/6001315</PackageIconUrl>
<PackageTags>fsharp, f#, aws, amazon, dynamodb</PackageTags>
</PropertyGroup>
Expand Down

0 comments on commit 6fd765b

Please sign in to comment.