Skip to content

Commit 1040477

Browse files
committed
Merge pull request #394 from forki/updatebuild
Update build to latest and greates
2 parents a6bd490 + 58523ba commit 1040477

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ FSharp.Compiler.Tools.Nuget/*.nupkg
127127
FSharp.Core.Nuget/*.nupkg
128128
*.orig
129129
.paket/paket.exe
130+
paket-files

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ os: Windows Server 2012 R2
22
init:
33
- git config --global core.autocrlf input
44
build_script:
5-
- cmd: build.cmd Release
5+
- cmd: build.cmd NuGet
66
test: off
77
version: '{build}'
88
artifacts:

build.fsx

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ let description = """
2727
interactive service that can be used for embedding F# scripting into your applications."""
2828
let tags = "F# fsharp interactive compiler editor"
2929

30-
let gitHome = "https://github.com/fsharp"
30+
let gitOwner = "fsharp"
31+
let gitHome = "https://github.com/" + gitOwner
32+
3133
let gitName = "FSharp.Compiler.Service"
3234
let gitRaw = environVarOrDefault "gitRaw" "https://raw.githubusercontent.com/fsharp"
3335

@@ -37,6 +39,8 @@ let netFrameworks = ["v4.0"; "v4.5"]
3739
// The rest of the code is standard F# build script
3840
// --------------------------------------------------------------------------------------
3941

42+
let buildDir = "bin"
43+
4044
// Read release notes & version info from RELEASE_NOTES.md
4145
let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md")
4246
let isAppVeyorBuild = buildServer = BuildServer.AppVeyor
@@ -65,10 +69,8 @@ Target "AssemblyInfo" (fun _ ->
6569
// --------------------------------------------------------------------------------------
6670
// Clean build results & restore NuGet packages
6771

68-
Target "RestorePackages" RestorePackages
69-
7072
Target "Clean" (fun _ ->
71-
CleanDirs ["bin" ]
73+
CleanDirs [ buildDir ]
7274
)
7375

7476
Target "CleanDocs" (fun _ ->
@@ -81,7 +83,7 @@ Target "CleanDocs" (fun _ ->
8183
Target "GenerateFSIStrings" (fun _ ->
8284
// Generate FSIStrings using the FSSrGen tool
8385
execProcess (fun p ->
84-
let dir = __SOURCE_DIRECTORY__ @@ "src/fsharp/fsi"
86+
let dir = __SOURCE_DIRECTORY__ </> "src/fsharp/fsi"
8587
p.Arguments <- "FSIstrings.txt FSIstrings.fs FSIstrings.resx"
8688
p.WorkingDirectory <- dir
8789
p.FileName <- !! "lib/bootstrap/4.0/fssrgen.exe" |> Seq.head ) TimeSpan.MaxValue
@@ -91,7 +93,7 @@ Target "GenerateFSIStrings" (fun _ ->
9193
Target "Build" (fun _ ->
9294
netFrameworks
9395
|> List.iter (fun framework ->
94-
let outputPath = "bin/" + framework
96+
let outputPath = buildDir </> framework
9597
!! (project + ".sln")
9698
|> MSBuild outputPath "Build" ["Configuration","Release"; "TargetFrameworkVersion", framework]
9799
|> Log (".NET " + framework + " Build-Output: "))
@@ -103,7 +105,7 @@ Target "SourceLink" (fun _ ->
103105
#else
104106
netFrameworks
105107
|> List.iter (fun framework ->
106-
let outputPath = __SOURCE_DIRECTORY__ @@ "bin/" + framework
108+
let outputPath = __SOURCE_DIRECTORY__ </> buildDir </> framework
107109
let proj = VsProj.Load "src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj"
108110
["Configuration","Release"; "TargetFrameworkVersion",framework; "OutputPath",outputPath]
109111
let sourceFiles =
@@ -140,15 +142,15 @@ Target "RunTests" (fun _ ->
140142

141143
Target "NuGet" (fun _ ->
142144
NuGet (fun p ->
143-
{ p with
145+
{ p with
144146
Authors = authors
145147
Project = project
146148
Summary = summary
147149
Description = description
148150
Version = buildVersion
149151
ReleaseNotes = release.Notes |> toLines
150152
Tags = tags
151-
OutputPath = "bin"
153+
OutputPath = buildDir
152154
AccessKey = getBuildParamOrDefault "nugetkey" ""
153155
Publish = hasBuildParam "nugetkey" })
154156
("nuget/" + project + ".nuspec")
@@ -180,7 +182,23 @@ Target "ReleaseDocs" (fun _ ->
180182
Branches.push "temp/gh-pages"
181183
)
182184

183-
Target "Release" DoNothing
185+
#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
186+
open Octokit
187+
188+
Target "Release" (fun _ ->
189+
StageAll ""
190+
Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
191+
Branches.push ""
192+
193+
Branches.tag "" release.NugetVersion
194+
Branches.pushTag "" "origin" release.NugetVersion
195+
196+
// release on github
197+
createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "")
198+
|> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
199+
|> releaseDraft
200+
|> Async.RunSynchronously
201+
)
184202

185203
// --------------------------------------------------------------------------------------
186204
// Run all targets by default. Invoke 'build <Target>' to override
@@ -191,7 +209,6 @@ Target "All" DoNothing
191209

192210
"Clean"
193211
=?> ("BuildVersion", isAppVeyorBuild)
194-
==> "RestorePackages"
195212
==> "AssemblyInfo"
196213
==> "GenerateFSIStrings"
197214
==> "Prepare"

paket.dependencies

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ nuget SQLite.Net.Platform.Generic 2.4.1
99
nuget NuGet.CommandLine
1010
nuget FAKE
1111
nuget FSharp.Formatting
12-
nuget SourceLink.Fake
12+
nuget SourceLink.Fake
13+
14+
github fsharp/FAKE modules/Octokit/Octokit.fsx

paket.lock

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,25 @@ NUGET
88
FSharpVSPowerTools.Core (1.8.0)
99
FSharpVSPowerTools.Core (1.8.0)
1010
FSharp.Compiler.Service (>= 0.0.87)
11+
Microsoft.Bcl (1.1.10)
12+
Microsoft.Bcl.Build (>= 1.0.14)
13+
Microsoft.Bcl.Build (1.0.21)
14+
Microsoft.Net.Http (2.2.29)
15+
Microsoft.Bcl (>= 1.1.10)
16+
Microsoft.Bcl.Build (>= 1.0.14)
1117
NuGet.CommandLine (2.8.6)
1218
NUnit (2.6.3)
1319
NUnit.Runners (2.6.3)
20+
Octokit (0.14.0) - framework: wpv8.0
21+
Microsoft.Net.Http
1422
SourceLink.Fake (1.0.0)
1523
sqlite-net-wp8 (3.8.5) - framework: wpv8.0
1624
SQLite.Net-PCL (3.0.5)
1725
sqlite-net-wp8 (>= 3.8.5) - framework: wpv8.0
1826
SQLite.Net.Platform.Generic (2.4.1)
1927
SQLite.Net-PCL
28+
GITHUB
29+
remote: fsharp/FAKE
30+
specs:
31+
modules/Octokit/Octokit.fsx (16296d960f02a6192baa9e3f9facb32aca7184bb)
32+
Octokit

0 commit comments

Comments
 (0)