From ee03780ad54c915d6a78fbd6d0815d88cde2f232 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Fri, 30 Sep 2022 16:00:23 +1000 Subject: [PATCH] fix: PR creation is automated in the homebrew-taps repo so no need to create it here (#97) --- .octopus/deployment_process.ocl | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.octopus/deployment_process.ocl b/.octopus/deployment_process.ocl index 1dcc370f..bb8ba204 100644 --- a/.octopus/deployment_process.ocl +++ b/.octopus/deployment_process.ocl @@ -102,27 +102,9 @@ step "create-pull-request-to-update-formula-in-homebrew" { Copy-Item -Path "$extractedPath/*" -Filter "*.rb" -Destination "." -Force - git commit -a -m "octopus-cli $packageVersion" - git push --set-upstream origin $branchName - - if ($githubtoken) { - $baseBranch = $(git symbolic-ref "refs/remotes/origin/HEAD") -replace "refs/remotes/origin/", "" - - $body = @{ - title = "octopus-cli $packageVersion" - body = "automatically generated" - head = $branchName - base = $baseBranch - } | ConvertTo-Json - - $body - - Invoke-RestMethod -Method POST ` - -Headers @{"Accept" = "application/vnd.github+json";"Authorization" = "Bearer $githubtoken"} ` - -Uri https://api.github.com/repos/OctopusDeploy/homebrew-taps/pulls ` - -ContentType "application/json" ` - -Body "$body" - } + git diff-index --quiet HEAD || (git commit -m "Update for release $packageVersion" \ + && git push --repo $origin --set-upstream origin $branchName \ + ) cd .. EOT