Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies #2632

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Expand Up @@ -9,13 +9,13 @@
]
},
"paket": {
"version": "6.0.13",
"version": "6.2.1",
"commands": [
"paket"
]
},
"fake-cli": {
"version": "5.21.0",
"version": "5.21.1",
"commands": [
"fake"
]
Expand Down
88 changes: 0 additions & 88 deletions build.fsx
Expand Up @@ -569,94 +569,6 @@ Target.create "SetAssemblyInfo" (fun _ ->
()
)

Target.create "StartBootstrapBuild" (fun _ ->
// Prepare stuff
let token = githubtoken.Value
let auth = sprintf "%s:x-oauth-basic@" token
let url = sprintf "https://%sgithub.com/%s/%s.git" auth github_release_user gitName
let gitDirectory = getVarOrDefault "GIT_DIRECTORY" "."
let remoteUrl =
if not BuildServer.isLocalBuild then
Git.CommandHelper.directRunGitCommandAndFail gitDirectory "config user.email matthi.d@gmail.com"
Git.CommandHelper.directRunGitCommandAndFail gitDirectory "config user.name \"Matthias Dittrich\""
url
else "origin"
if BuildServer.buildServer = BuildServer.TeamFoundation then
Trace.trace "Prepare git directory"
Git.Branches.checkout gitDirectory false TeamFoundation.Environment.BuildSourceVersion

let oldBranch = Git.Information.getBranchName gitDirectory
let branchName = sprintf "release-stage/%s" nugetVersion
Git.Branches.checkout gitDirectory true branchName

// update paket.dependencies
let depsFile = File.ReadAllText (gitDirectory </> "paket.dependencies")
let replacedFile =
depsFile
.Replace("// FAKE_MYGET_FEED (don't edit this line)", "source https://www.myget.org/F/fake-vsts/api/v3/index.json")
.Replace("prerelease // FAKE_VERSION (don't edit this line)", nugetVersion)
File.WriteAllText(gitDirectory </> "paket.dependencies", replacedFile)

// paket update
callpaket gitDirectory "update --group NetcoreBuild"

// push to branch
Git.Staging.stageAll gitDirectory
Git.Commit.exec gitDirectory (sprintf "Bootstrap check for %s" simpleVersion)
Git.Branches.pushBranch gitDirectory remoteUrl branchName
let sha = Git.Information.getCurrentSHA1 gitDirectory

// check status API
let startTime = System.Diagnostics.Stopwatch.StartNew()
let maxTime = System.TimeSpan.FromMinutes 60.0
let formatState (state:Octokit.CommitStatus) =
sprintf "{ State: %O, Description: %O, TargetUrl: %O }"
state.State state.Description state.TargetUrl
let result =
async {
let! client = GitHub.createClientWithToken token
let mutable whileResult = None
while startTime.Elapsed < maxTime && whileResult.IsNone do
let! combStatus = client.Repository.Status.GetCombined(github_release_user, gitName, sha) |> Async.AwaitTask
let doWait () =
async {
Trace.trace "GitHub state is still pending:"
for status in combStatus.Statuses do
Trace.trace (sprintf " - %s" (formatState status))
do! Async.Sleep (1000 * 60 * 2) // wait 2 minutes
}

match combStatus.State.Value with
| _ when combStatus.TotalCount < 2 -> // not yet notified
do! doWait()
| Octokit.CommitState.Success ->
whileResult <- Some <| Result.Ok ()
()
| Octokit.CommitState.Error | Octokit.CommitState.Failure ->
whileResult <- Some <| Result.Error combStatus
()
| _ -> // pending
do! doWait()
match whileResult with
| Some r -> return r
| None ->
// time is up
let! combStatus = client.Repository.Status.GetCombined(github_release_user, gitName, sha) |> Async.AwaitTask
return
match combStatus.State.Value with
| Octokit.CommitState.Error | Octokit.CommitState.Failure ->
Result.Error combStatus
| _ -> // if pending then some ci is just crasy slow
Result.Ok ()
} |> Async.RunSynchronously
match result with
| Result.Ok () ->
Trace.trace "All CI systems returned OK or pending... -> OK"
| Result.Error combStatus ->
System.String.Join("\n - ", combStatus.Statuses |> Seq.map formatState)
|> failwithf "At least one CI failed:\n - %s"
)

Target.create "UnskipAssemblyInfo" (fun _ ->
for assemblyFile, _ in assemblyInfos do
// Unskip assemblyinfos, needed if you want to checkin changes...
Expand Down
62 changes: 12 additions & 50 deletions paket.dependencies
@@ -1,4 +1,4 @@
version 5.5
version 5.6
source https://api.nuget.org/v3/index.json
content: none

Expand All @@ -11,84 +11,48 @@ group DocsLegacyV5
nuget FAKE ~> 5.0

group Build
source release/dotnetcore
source https://api.nuget.org/v3/index.json
content: none

nuget FSharp.Core
nuget Suave
nuget NuGet.CommandLine
nuget FSharp.Formatting ~> 4.1
nuget FSharp.Formatting.CommandTool ~> 4.1
nuget SourceLink.Fake
nuget ILRepack
nuget Newtonsoft.Json
github fsharp/FAKE modules/Octokit/Octokit.fsx

// [ FAKE GROUP ]
group NetcoreBuild
source https://api.nuget.org/v3/index.json
// FAKE_MYGET_FEED (don't edit this line)
framework: netstandard2.0, net6.0
storage: none

nuget FSharp.Control.Reactive
nuget System.Reactive
nuget FSharp.Core
nuget Suave
nuget System.AppContext prerelease
nuget Paket.Core
nuget Fake.Api.GitHub prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.Core.Target prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.Core.SemVer prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.BuildServer.AppVeyor prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.BuildServer.TeamCity prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.BuildServer.Travis prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.BuildServer.TeamFoundation prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.BuildServer.GitLab prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.IO.FileSystem prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.IO.Zip prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.Core.ReleaseNotes prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.AssemblyInfoFile prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.MsBuild prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.Cli prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.NuGet prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.Paket prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.FSFormatting prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.Testing.MSpec prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.Testing.XUnit2 prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.DotNet.Testing.NUnit prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.Windows.Chocolatey prerelease // FAKE_VERSION (don't edit this line)
nuget Fake.Tools.Git prerelease // FAKE_VERSION (don't edit this line)
nuget Mono.Cecil prerelease
nuget System.Net.Http
nuget Octokit
nuget Newtonsoft.Json

// New group because of FSharp.Core 4.5 upgrade, see https://github.com/fsharp/FAKE/pull/2011
group netcorerunner

group fakerunner
source https://api.nuget.org/v3/index.json
framework: net472, netstandard2.0, netcoreapp2.1, net6.0
storage: none

nuget FSharp.Core
nuget FSharp.Compiler.Service
nuget Microsoft.Deployment.DotNet.Releases
nuget Paket.Core
nuget Mono.Cecil
nuget Microsoft.NETCore.App framework: netstandard1.6, netstandard2.0, netcoreapp1.1
nuget NETStandard.Library
nuget Packaging.Targets
nuget FSharp.Compiler.Service
nuget System.Runtime.Loader

// Testing
nuget Expecto ~> 8
nuget YoloDev.Expecto.TestSdk
nuget Microsoft.TestPlatform.TestHost
nuget Expecto
nuget Expecto.TestResults
nuget Expecto.FsCheck
nuget YoloDev.Expecto.TestSdk
nuget Microsoft.TestPlatform.TestHost
nuget FsCheck
nuget FParsec // commandline tests
nuget FParsec
nuget Newtonsoft.Json

group netcore
group fakemodule
source https://api.nuget.org/v3/index.json
framework: net472, netstandard2.0, netcoreapp2.1, net6.0
storage: none
Expand All @@ -112,8 +76,6 @@ group netcore
nuget Microsoft.Build.Tasks.Core
nuget Microsoft.Build.Utilities.Core
nuget BlackFox.VsWhere


nuget System.Runtime.Loader
nuget System.Collections.Immutable
nuget System.Data.SqlClient
Expand Down