From 258d6ca8ee96050aa6613f323eadb7827efb1064 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Sun, 10 Nov 2024 02:03:11 +0200 Subject: [PATCH] Remove unused release code from the build script. --- build.fsx | 60 ---------------------------------------------- paket.dependencies | 3 --- paket.lock | 4 ---- 3 files changed, 67 deletions(-) diff --git a/build.fsx b/build.fsx index 7ea7cfb0..aeaf18c4 100644 --- a/build.fsx +++ b/build.fsx @@ -15,7 +15,6 @@ #load "./.fake/build.fsx/intellisense_lazy.fsx" #endif -open Fake.Api open Fake.BuildServer open Fake.Core open Fake.Core.TargetOperators @@ -144,11 +143,6 @@ BuildServer.install [GitHubActions.Installer] let githubToken = lazy(Environment.environVarOrFail "farkle-github-token") let nugetKey = lazy(Environment.environVarOrFail "NUGET_KEY") -Target.description "Fails the build if the appropriate environment variables for the release do not exist" -Target.create "CheckForReleaseCredentials" (fun _ -> - githubToken.Value |> ignore - nugetKey.Value |> ignore) - let fReleaseConfiguration x = {x with DotNet.BuildOptions.Configuration = configuration} let inline fCommonOptions x = @@ -310,19 +304,6 @@ Target.create "NuGetPack" (fun _ -> Seq.iter pushArtifact nugetPackages ) -Target.description "Publishes the NuGet packages" -Target.create "NuGetPublish" (fun _ -> - Seq.iter (DotNet.nugetPush (fun p -> - {p with - PushParams = - {p.PushParams with - Source = Some "https://www.nuget.org" - ApiKey = Some nugetKey.Value - } - } - )) nugetPackages -) - // -------------------------------------------------------------------------------------- // Generate the documentation @@ -378,20 +359,6 @@ Target.create "GenerateDocs" (fun _ -> Target.description "Generates the website for the project - for local use" Target.create "GenerateDocsDebug" (fun _ -> generateDocs false false) -Target.description "Releases the documentation to GitHub Pages." -Target.create "ReleaseDocs" (fun _ -> - let tempDocsDir = "temp/gh-pages" - Shell.cleanDir tempDocsDir - Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir - - // Some files might no longer exist; better delete them all before the copy. - !! "temp/gh-pages/**" -- "temp/gh-pages/.git/**" |> File.deleteAll - Shell.copyRecursive docsOutput tempDocsDir true |> Trace.tracefn "Copied %A" - Staging.stageAll tempDocsDir - Commit.exec tempDocsDir (sprintf "Update generated documentation for version %s" nugetVersion) - Branches.push tempDocsDir -) - // -------------------------------------------------------------------------------------- // Release Scripts @@ -408,27 +375,6 @@ Target.create "PublishBenchmarkReport" (fun _ -> Branches.pushBranch "" remoteToPush.Value (Information.getBranchName "") ) -Target.description "Makes a tag on the current commit, and a GitHub release afterwards." -Target.create "GitHubRelease" (fun _ -> - - Branches.tag "" nugetVersion - Branches.pushTag "" remoteToPush.Value nugetVersion - - GitHub.createClientWithToken githubToken.Value - |> GitHub.createRelease gitOwner gitName nugetVersion - (fun x -> - {x with - Name = sprintf "Version %s" nugetVersion - Prerelease = releaseInfo.SemVer.PreRelease.IsSome - Body = releaseNotes |> Seq.map (sprintf "* %s") |> String.concat Environment.NewLine}) - |> GitHub.uploadFiles releaseArtifacts - |> GitHub.publishDraft - |> Async.RunSynchronously -) - -Target.description "Publishes the documentation and makes a GitHub release" -Target.create "Release" ignore - // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build target ' to override @@ -468,11 +414,5 @@ Target.create "Release" ignore "Clean" ==> "NuGetPack" - ==> "NuGetPublish" - ==> "GitHubRelease" - -"CheckForReleaseCredentials" - ==> "GitHubRelease" - ==> "Release" Target.runOrDefault "NuGetPack" diff --git a/paket.dependencies b/paket.dependencies index 65faa592..9e08f228 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -9,7 +9,6 @@ group FakeBuild nuget FSharp.Core ~> 6 - nuget Fake.Api.GitHub ~> 5 nuget Fake.BuildServer.GitHubActions ~> 5 nuget Fake.Core.ReleaseNotes ~> 5 nuget Fake.Core.Target ~> 5 @@ -29,6 +28,4 @@ group FakeBuild nuget MSBuild.StructuredLogger - nuget Octokit = 0.48 - nuget Scriban diff --git a/paket.lock b/paket.lock index 444cc8b4..091954c4 100644 --- a/paket.lock +++ b/paket.lock @@ -8,9 +8,6 @@ NUGET BlackFox.VsWhere (1.1) FSharp.Core (>= 4.2.3) Microsoft.Win32.Registry (>= 4.7) - Fake.Api.GitHub (5.20.4) - FSharp.Core (>= 4.7.2) - Octokit (>= 0.48) Fake.BuildServer.GitHubActions (5.23.1) Fake.Core.Environment (>= 5.23.1) Fake.Core.Trace (>= 5.23.1) @@ -175,7 +172,6 @@ NUGET NuGet.Protocol (5.10) NuGet.Packaging (>= 5.10) NuGet.Versioning (5.10) - Octokit (0.48) Scriban (4.0.1) Microsoft.CSharp (>= 4.5) System.Threading.Tasks.Extensions (>= 4.5)