Skip to content

Commit

Permalink
Update release machinery
Browse files Browse the repository at this point in the history
  • Loading branch information
rneatherway committed Jul 30, 2015
1 parent 48e70c9 commit 8ffc5a8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
34 changes: 22 additions & 12 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
open Fake
open Fake.Git
open Fake.ReleaseNotesHelper
open Fake.UserInputHelper
open Fake.ZipHelper
open Fake.AssemblyInfoFile
open System
open System.IO
open System.Text.RegularExpressions

let githubOrg = "fsharp"
let project = "FsAutoComplete"
let summary = "A command line tool for interfacing with FSharp.Compiler.Service over a pipe."

Expand Down Expand Up @@ -95,16 +97,26 @@ Target "ReleaseArchive" (fun _ ->
++ (buildReleaseDir + "/*.exe"))
)

Target "ReleaseInstructions"
(fun _ ->
printfn "Go to https://github.com/fsharp/FsAutoComplete/releases/new"
printfn "Enter the following information:\n"
printfn "\tTag version: %s" release.AssemblyVersion
printfn "\tRelease title: %s" release.AssemblyVersion
printfn "\tNotes:\n"
for note in release.Notes do
printfn "%s" note
printfn "\n\nAttach the archive '%s'" releaseArchive
#load "lib/Octokit.fsx"
open Octokit

Target "Release" (fun _ ->
let user = getUserInput "Username: "
let pw = getUserPassword "Password: "

StageAll ""
Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
Branches.push ""

Branches.tag "" release.NugetVersion
Branches.pushTag "" "origin" release.NugetVersion

// release on github
createClient user pw
|> createDraft githubOrg project release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
|> uploadFile releaseArchive
|> releaseDraft
|> Async.RunSynchronously
)

Target "Clean" (fun _ ->
Expand All @@ -115,7 +127,6 @@ Target "Clean" (fun _ ->
Target "Build" id
Target "Test" id
Target "All" id
Target "Release" id

"BuildDebug"
==> "Build"
Expand All @@ -134,7 +145,6 @@ Target "Release" id
"AssemblyInfo"
==> "BuildRelease"
==> "ReleaseArchive"
==> "ReleaseInstructions"
==> "Release"

RunTargetOrDefault "BuildDebug"
Expand Down
3 changes: 2 additions & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ nuget Newtonsoft.Json
nuget FAKE
nuget FSharp.Core 3.0.2
nuget NUnit
nuget NUnit.Runners
nuget NUnit.Runners
nuget Octokit
14 changes: 11 additions & 3 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
NUGET
remote: https://www.nuget.org/api/v2
specs:
FAKE (3.35.1)
FSharp.Compiler.Service (0.0.90) - framework: >= net45
FAKE (4.0.2)
FSharp.Compiler.Service (1.3.1.0) - framework: >= net45
FSharp.Core (3.0.2)
Microsoft.Bcl (1.1.10)
Microsoft.Bcl.Build (>= 1.0.14)
Microsoft.Bcl.Build (1.0.21)
Microsoft.Net.Http (2.2.29)
Microsoft.Bcl (>= 1.1.10)
Microsoft.Bcl.Build (>= 1.0.14)
Mono.Cecil (0.9.6.1)
NDesk.Options (0.2.1)
Newtonsoft.Json (6.0.8)
Newtonsoft.Json (7.0.1)
NUnit (2.6.4)
NUnit.Runners (2.6.4)
Octokit (0.14.0)
Microsoft.Net.Http

0 comments on commit 8ffc5a8

Please sign in to comment.