Skip to content

Commit

Permalink
Bump version to 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haf committed May 17, 2018
1 parent 733fd1a commit 390a9e6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
8 changes: 4 additions & 4 deletions HttpFs.IntegrationTests/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("HttpFs.IntegrationTests")>]
[<assembly: AssemblyCopyrightAttribute("Copyright © 2018")>]
[<assembly: AssemblyDescriptionAttribute("A simple, functional HTTP client library for F#")>]
[<assembly: AssemblyVersionAttribute("5.0.2")>]
[<assembly: AssemblyFileVersionAttribute("5.0.2")>]
[<assembly: AssemblyVersionAttribute("5.1.0")>]
[<assembly: AssemblyFileVersionAttribute("5.1.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "HttpFs.IntegrationTests"
let [<Literal>] AssemblyProduct = "HttpFs.IntegrationTests"
let [<Literal>] AssemblyCopyright = "Copyright © 2018"
let [<Literal>] AssemblyDescription = "A simple, functional HTTP client library for F#"
let [<Literal>] AssemblyVersion = "5.0.2"
let [<Literal>] AssemblyFileVersion = "5.0.2"
let [<Literal>] AssemblyVersion = "5.1.0"
let [<Literal>] AssemblyFileVersion = "5.1.0"
8 changes: 4 additions & 4 deletions HttpFs.UnitTests/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("HttpFs.UnitTests")>]
[<assembly: AssemblyCopyrightAttribute("Copyright © 2018")>]
[<assembly: AssemblyDescriptionAttribute("A simple, functional HTTP client library for F#")>]
[<assembly: AssemblyVersionAttribute("5.0.2")>]
[<assembly: AssemblyFileVersionAttribute("5.0.2")>]
[<assembly: AssemblyVersionAttribute("5.1.0")>]
[<assembly: AssemblyFileVersionAttribute("5.1.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "HttpFs.UnitTests"
let [<Literal>] AssemblyProduct = "HttpFs.UnitTests"
let [<Literal>] AssemblyCopyright = "Copyright © 2018"
let [<Literal>] AssemblyDescription = "A simple, functional HTTP client library for F#"
let [<Literal>] AssemblyVersion = "5.0.2"
let [<Literal>] AssemblyFileVersion = "5.0.2"
let [<Literal>] AssemblyVersion = "5.1.0"
let [<Literal>] AssemblyFileVersion = "5.1.0"
8 changes: 4 additions & 4 deletions HttpFs/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ open System.Reflection
[<assembly: AssemblyProductAttribute("HttpFs")>]
[<assembly: AssemblyCopyrightAttribute("Copyright © 2018")>]
[<assembly: AssemblyDescriptionAttribute("A simple, functional HTTP client library for F#")>]
[<assembly: AssemblyVersionAttribute("5.0.2")>]
[<assembly: AssemblyFileVersionAttribute("5.0.2")>]
[<assembly: AssemblyVersionAttribute("5.1.0")>]
[<assembly: AssemblyFileVersionAttribute("5.1.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "HttpFs"
let [<Literal>] AssemblyProduct = "HttpFs"
let [<Literal>] AssemblyCopyright = "Copyright © 2018"
let [<Literal>] AssemblyDescription = "A simple, functional HTTP client library for F#"
let [<Literal>] AssemblyVersion = "5.0.2"
let [<Literal>] AssemblyFileVersion = "5.0.2"
let [<Literal>] AssemblyVersion = "5.1.0"
let [<Literal>] AssemblyFileVersion = "5.1.0"
2 changes: 1 addition & 1 deletion HttpFs/HttpFs.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>HttpFs</AssemblyName>
<PackageId>Http.fs</PackageId>
<Version>5.0.2</Version>
<Version>5.1.0</Version>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
Expand Down
31 changes: 22 additions & 9 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,35 +95,48 @@ Target "Pack" (fun _ ->
("pack HttpFs/HttpFs.fsproj -c "+configuration + " -o ../bin " + (packParameters "Http.fs"))
)

Target "Push" (fun _ -> Paket.Push (fun p -> { p with WorkingDir = "bin" }))
let envReq key =
let value = Environment.GetEnvironmentVariable key
if String.IsNullOrWhiteSpace value then failwith "GITHUB_TOKEN env var is missing."
value

Target "GuardEnv" (fun _ ->
ignore (envReq "GITHUB_TOKEN")
ignore (envReq "NUGET_KEY"))

Target "Push" (fun _ ->
Paket.Push (fun p -> { p with WorkingDir = "bin"
ApiKey = envReq "NUGET_KEY"
}))

#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
Target "Release" (fun _ ->
let gitOwner = "haf"
let gitName = "expecto"
let gitName = "Http.fs"
let gitOwnerName = gitOwner + "/" + gitName
let remote =
Git.CommandHelper.getGitResult "" "remote -v"
|> Seq.tryFind (fun s -> s.EndsWith "(push)" && s.Contains gitOwnerName)
|> function None -> ("ssh://github.com/"+gitOwnerName) | Some s -> s.Split().[0]
|> function None -> ("git@github.com:"+gitOwnerName) | Some s -> s.Split().[0]

Git.Staging.StageAll ""
Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
Git.Branches.pushBranch "" remote (Git.Information.getBranchName "")

Git.Branches.tag "" release.NugetVersion
Git.Branches.pushTag "" remote release.NugetVersion
let tag = sprintf "v%O" release.SemVer
Git.Branches.tag "" tag
Git.Branches.pushTag "" remote tag

let user = getUserInput "Github Username: "
let pw = getUserPassword "Github Password: "

Octokit.createClient user pw
Octokit.createClientWithToken (Environment.GetEnvironmentVariable "GITHUB_TOKEN")
|> Octokit.createDraft gitOwner gitName release.NugetVersion
(Option.isSome release.SemVer.PreRelease) release.Notes
|> Octokit.releaseDraft
|> Async.RunSynchronously
)

"GuardEnv" ==> "Push"
"GuardEnv" ==> "Release"

Target "All" ignore

"Clean"
Expand Down

0 comments on commit 390a9e6

Please sign in to comment.