Skip to content

Commit

Permalink
Remove cloudflare cache purge from build
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Mar 9, 2022
1 parent 2106551 commit 210d3c6
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ let isAlpha = (isBeta || branchName = "develop")
let mutable donePublish = false

let githubApiKey = environVar "BLYTHMEISTER_GITHUB_KEY"
let cloudflareApiKey = environVar "BLYTHMEISTER_CLOUDFLARE_KEY"
let cloudflareEmail = environVar "BLYTHMEISTER_CLOUDFLARE_EMAIL"
let cloudflareZone = environVar "BLYTHMEISTER_CLOUDFLARE_ZONE"
let exceptionlessApiKey = environVar "BLYTHMEISTER_EXCEPTIONLESS_KEY"

printfn "Running On Branch: %s" branchName
Expand Down Expand Up @@ -259,20 +256,6 @@ Target "Publish-ReleaseNotes" (fun _ ->
printfn "No releases pushed, so skipping release notes"
)

Target "Publish-PurgeCloudflareCache" (fun _ ->
printfn "Purging Cloudflare"
try
let client = new WebClient()
client.Headers.Add("X-Auth-Email", cloudflareEmail)
client.Headers.Add("X-Auth-Key", cloudflareApiKey)
client.Headers.Add("Content-Type", "application/json")
let result = client.UploadString(sprintf "https://api.cloudflare.com/client/v4/zones/%s/purge_cache" cloudflareZone, "POST", "{\"purge_everything\":true}")
client.Dispose()
printfn "Cloudflare Purge response: %s" result
with e ->
failwithf "Cloudflare Purge request failed: %s" e.Message
)

Target "Default" DoNothing

"Clean"
Expand All @@ -283,7 +266,6 @@ Target "Default" DoNothing
=?> ("Publish-Artifacts", isAppVeyor && not(isPR))
=?> ("Publish-ReleaseRepo", isAppVeyor && not(isPR))
=?> ("Publish-ReleaseNotes", isAppVeyor && not(isPR) && (isBeta || isStable))
=?> ("Publish-PurgeCloudflareCache", isAppVeyor && not(isPR))
==> "Default"

RunParameterTargetOrDefault "target" "Default"

0 comments on commit 210d3c6

Please sign in to comment.