Skip to content

Commit

Permalink
Bump version to 0.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rneatherway committed Jul 30, 2015
1 parent 8ffc5a8 commit 0ef5f0f
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FsAutoComplete/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FsAutoComplete")>]
[<assembly: AssemblyProductAttribute("FsAutoComplete")>]
[<assembly: AssemblyDescriptionAttribute("A command line tool for interfacing with FSharp.Compiler.Service over a pipe.")>]
[<assembly: AssemblyVersionAttribute("0.20.0")>]
[<assembly: AssemblyFileVersionAttribute("0.20.0")>]
[<assembly: AssemblyVersionAttribute("0.20.1")>]
[<assembly: AssemblyFileVersionAttribute("0.20.1")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "0.20.0"
let [<Literal>] Version = "0.20.1"
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 0.20.1 - 30.07.2015

* Fix exception in `symboluse` command: #46.

#### 0.20.0 - 28.07.2015

Backwards-incompatible changes:
Expand Down
67 changes: 67 additions & 0 deletions lib/Octokit.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// This file is a copy of the one included in FAKE, with
// use of retry removed, as this causes a NullPointerException
// on Mono.

#I __SOURCE_DIRECTORY__
#r @"../packages/Octokit/lib/net45/Octokit.dll"

open Octokit
open System
open System.IO

type Draft =
{ Client : GitHubClient
Owner : string
Project : string
DraftRelease : Release }

let rec private retry count asyncF =
async {
try
return! asyncF
with _ when count > 0 -> return! retry (count - 1) asyncF
}


let createClient user password =
async {
let github = new GitHubClient(new ProductHeaderValue("FAKE"))
github.Credentials <- Credentials(user, password)
return github
}

let createDraft owner project version prerelease (notes: string seq) (client : Async<GitHubClient>) =
async {
let data = new NewRelease(version)
data.Name <- version
data.Body <- String.Join(Environment.NewLine, notes)
data.Draft <- true
data.Prerelease <- prerelease
let! client' = client
let! draft = Async.AwaitTask <| client'.Release.Create(owner, project, data)
printfn "Created draft release id %d" draft.Id
return { Client = client'
Owner = owner
Project = project
DraftRelease = draft }
}

let uploadFile fileName (draft : Async<Draft>) =
async {
let fi = FileInfo(fileName)
let archiveContents = File.OpenRead(fi.FullName)
let assetUpload = new ReleaseAssetUpload(fi.Name,"application/octet-stream",archiveContents,Nullable<TimeSpan>())
let! draft' = draft
let! asset = Async.AwaitTask <| draft'.Client.Release.UploadAsset(draft'.DraftRelease, assetUpload)
printfn "Uploaded %s" asset.Name
return draft'
}

let releaseDraft (draft : Async<Draft>) =
async {
let! draft' = draft
let update = draft'.DraftRelease.ToUpdate()
update.Draft <- Nullable<bool>(false)
let! released = Async.AwaitTask <| draft'.Client.Release.Edit(draft'.Owner, draft'.Project, draft'.DraftRelease.Id, update)
printfn "Released %d on github" released.Id
}

0 comments on commit 0ef5f0f

Please sign in to comment.